issue 32: remove dropout in stateful RNN

main
Thierry Herrmann 2019-09-28 12:06:05 -04:00
parent b9509ced94
commit 22aa520ccc
1 changed files with 5 additions and 2 deletions

View File

@ -293,9 +293,12 @@
"source": [
"model = keras.models.Sequential([\n",
" keras.layers.GRU(128, return_sequences=True, input_shape=[None, max_id],\n",
" dropout=0.2, recurrent_dropout=0.2),\n",
" # no dropout in stateful RNN (https://github.com/ageron/handson-ml2/issues/32)\n",
" # dropout=0.2, recurrent_dropout=0.2,\n",
" ),\n",
" keras.layers.GRU(128, return_sequences=True,\n",
" dropout=0.2, recurrent_dropout=0.2),\n",
" # dropout=0.2, recurrent_dropout=0.2\n",
" ),\n",
" keras.layers.TimeDistributed(keras.layers.Dense(max_id,\n",
" activation=\"softmax\"))\n",
"])\n",