From 6cec4e353c0bcf74dc5343b8c79beb6adc4c363c Mon Sep 17 00:00:00 2001 From: Nikolas Garofil Date: Tue, 11 Aug 2020 16:23:44 +0200 Subject: [PATCH 1/5] Change rebuild target * --no-cache is needed to guarantee a full rebuild from scratch * --force-rm is not needed because rebuild calls the stop target --- docker/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Makefile b/docker/Makefile index c5a98cc..0a3cf85 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -8,7 +8,7 @@ exec: build: stop .FORCE docker-compose build rebuild: stop .FORCE - docker-compose build --force-rm + docker-compose build --no-cache stop: docker stop handson-ml2 || true; docker rm handson-ml2 || true; .FORCE: From 7111fe397a6b3c58bef4b3bf5ff28fe4a1f594e7 Mon Sep 17 00:00:00 2001 From: Ian Beauregard Date: Mon, 17 Aug 2020 09:26:01 -0400 Subject: [PATCH 2/5] Use object attribute instead of global constant --- 05_support_vector_machines.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/05_support_vector_machines.ipynb b/05_support_vector_machines.ipynb index 2fa5543..2a47f0c 100644 --- a/05_support_vector_machines.ipynb +++ b/05_support_vector_machines.ipynb @@ -1109,7 +1109,7 @@ " self.Js.append(J)\n", "\n", " w_gradient_vector = w - self.C * np.sum(X_t_sv, axis=0).reshape(-1, 1)\n", - " b_derivative = -C * np.sum(t_sv)\n", + " b_derivative = -self.C * np.sum(t_sv)\n", " \n", " w = w - self.eta(epoch) * w_gradient_vector\n", " b = b - self.eta(epoch) * b_derivative\n", From 59b9115ccb2f6cd6d3efa33a0f9f6d5c5211f940 Mon Sep 17 00:00:00 2001 From: Ajmal Khan Date: Wed, 26 Aug 2020 07:40:19 -0500 Subject: [PATCH 3/5] Modify import of urllib to urllib.request The import as-is will fail as changes have been made to urllib. This fix will allow the rest of the code to work as-is. --- 01_the_machine_learning_landscape.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/01_the_machine_learning_landscape.ipynb b/01_the_machine_learning_landscape.ipynb index 24f8aaa..a1f92db 100644 --- a/01_the_machine_learning_landscape.ipynb +++ b/01_the_machine_learning_landscape.ipynb @@ -124,7 +124,7 @@ "outputs": [], "source": [ "# Download the data\n", - "import urllib\n", + "import urllib.request\n", "DOWNLOAD_ROOT = \"https://raw.githubusercontent.com/ageron/handson-ml2/master/\"\n", "os.makedirs(datapath, exist_ok=True)\n", "for filename in (\"oecd_bli_2015.csv\", \"gdp_per_capita.csv\"):\n", From 70a515793caadca9ece2695dfdc00099240fe4f1 Mon Sep 17 00:00:00 2001 From: baseplate77 <49200489+baseplate77@users.noreply.github.com> Date: Fri, 4 Sep 2020 14:43:05 +0530 Subject: [PATCH 4/5] Update 16_nlp_with_rnns_and_attention.ipynb Exercise question 9 solution Third version decoder embedding "input_din=(len(OUTPUT_CHARS) + 2)" --- 16_nlp_with_rnns_and_attention.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/16_nlp_with_rnns_and_attention.ipynb b/16_nlp_with_rnns_and_attention.ipynb index 328e421..7a85926 100644 --- a/16_nlp_with_rnns_and_attention.ipynb +++ b/16_nlp_with_rnns_and_attention.ipynb @@ -2063,7 +2063,7 @@ " len(INPUT_CHARS) + 1, encoder_embedding_size)(encoder_inputs)\n", "\n", "decoder_embedding_layer = keras.layers.Embedding(\n", - " len(INPUT_CHARS) + 2, decoder_embedding_size)\n", + " len(OUTPUT_CHARS) + 2, decoder_embedding_size)\n", "decoder_embeddings = decoder_embedding_layer(decoder_inputs)\n", "\n", "encoder = keras.layers.LSTM(units, return_state=True)\n", From c4c4f1bac94870199c0c8a54f81f3f14679e41db Mon Sep 17 00:00:00 2001 From: AndC314 <40807923+AndC314@users.noreply.github.com> Date: Wed, 9 Sep 2020 09:45:13 +0200 Subject: [PATCH 5/5] Update 01_the_machine_learning_landscape.ipynb updated import urllib.request to make urllib.request.urlretrieve(url, datapath + filename) work properly --- 01_the_machine_learning_landscape.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/01_the_machine_learning_landscape.ipynb b/01_the_machine_learning_landscape.ipynb index 24f8aaa..a1f92db 100644 --- a/01_the_machine_learning_landscape.ipynb +++ b/01_the_machine_learning_landscape.ipynb @@ -124,7 +124,7 @@ "outputs": [], "source": [ "# Download the data\n", - "import urllib\n", + "import urllib.request\n", "DOWNLOAD_ROOT = \"https://raw.githubusercontent.com/ageron/handson-ml2/master/\"\n", "os.makedirs(datapath, exist_ok=True)\n", "for filename in (\"oecd_bli_2015.csv\", \"gdp_per_capita.csv\"):\n",