From 2c700450b5d048eddeb3bf542692243570f9e305 Mon Sep 17 00:00:00 2001 From: Ian Beauregard Date: Mon, 19 Oct 2020 17:17:35 -0400 Subject: [PATCH] Change Embedding's input_dim argument Wrong argument for the decoder's embedding layer. --- 16_nlp_with_rnns_and_attention.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/16_nlp_with_rnns_and_attention.ipynb b/16_nlp_with_rnns_and_attention.ipynb index f7baa44..562b856 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", @@ -2260,7 +2260,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",