From 67f33429cc54c1955763f64815bcd9919a19d34e Mon Sep 17 00:00:00 2001 From: Ian Beauregard Date: Sat, 15 Aug 2020 10:08:44 -0400 Subject: [PATCH] Remove useless code --- 04_training_linear_models.ipynb | 3 --- 1 file changed, 3 deletions(-) diff --git a/04_training_linear_models.ipynb b/04_training_linear_models.ipynb index 0ac4d1a..e85e30f 100644 --- a/04_training_linear_models.ipynb +++ b/04_training_linear_models.ipynb @@ -1657,9 +1657,6 @@ "for iteration in range(n_iterations):\n", " logits = X_train.dot(Theta)\n", " Y_proba = softmax(logits)\n", - " xentropy_loss = -np.mean(np.sum(Y_train_one_hot * np.log(Y_proba + epsilon), axis=1))\n", - " l2_loss = 1/2 * np.sum(np.square(Theta[1:]))\n", - " loss = xentropy_loss + alpha * l2_loss\n", " error = Y_proba - Y_train_one_hot\n", " gradients = 1/m * X_train.T.dot(error) + np.r_[np.zeros([1, n_outputs]), alpha * Theta[1:]]\n", " Theta = Theta - eta * gradients\n",