Skip to content

Commit

Permalink
so much betterrrrrr
Browse files Browse the repository at this point in the history
  • Loading branch information
jshtaway committed Oct 23, 2018
1 parent 0a1496a commit 5210f5f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 12 deletions.
19 changes: 13 additions & 6 deletions word_based.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -268,18 +268,25 @@
" #-- -- ---- --- --- --- --- --- ---- --- --- --- --\n",
"\n",
" #-- Model List --- --- --- --- --- --- --- --- --- -- ---- --- --- --- ---- -- --\n",
"# modelList = [{'model':'Embedding', 'input_dim':vocab_size, 'output_dim': 256, 'input_length': seq_length},\n",
"# {'model': 'LSTM', 'units':256, 'use_bias':True, 'dropout':.2, 'recurrent_dropout': 0, 'return_sequences': True}, \n",
"# {'model': 'Dense','units':64,'activation':'relu'}, \n",
"# {'model': 'LSTM', 'units':256, 'use_bias':True, 'dropout':.2, 'recurrent_dropout': 0, 'return_sequences': True}, \n",
"# {'model': 'Dense','units':64,'activation':'relu'}, \n",
"# {'model':'Flatten'},\n",
"# {'model': 'Dense','units':vocab_size,'activation':'softmax'},\n",
"# ]\n",
" modelList = [{'model':'Embedding', 'input_dim':vocab_size, 'output_dim': 256, 'input_length': seq_length},\n",
" {'model': 'LSTM', 'units':256, 'use_bias':True, 'dropout':.2, 'recurrent_dropout': 0, 'return_sequences': True}, \n",
" {'model': 'Dense','units':64,'activation':'relu'}, \n",
" {'model': 'Dense','units':100,'activation':'relu'}, \n",
" {'model': 'LSTM', 'units':256, 'use_bias':True, 'dropout':.2, 'recurrent_dropout': 0, 'return_sequences': True}, \n",
" {'model': 'Dense','units':64,'activation':'relu'}, \n",
" {'model': 'Dense','units':100,'activation':'relu'}, \n",
" {'model': 'LSTM', 'units':256, 'use_bias':True, 'dropout':.2, 'recurrent_dropout': 0, 'return_sequences': True}, \n",
" {'model': 'Dense','units':100,'activation':'relu'}, \n",
" {'model':'Flatten'},\n",
" {'model': 'Dense','units':vocab_size,'activation':'softmax'},\n",
" ]\n",
"# modelList = [('Embedding', vocab_size, seq_length), ('LSTM',256,'True'), ('Dense',256,'relu'), ('Dropout',.2,''), \n",
"# ('LSTM',128,'True'), ('Dense',128,'relu'), ('Dropout',.2,''), \n",
"# ('LSTM', 64,'False'), ('Dense',64,'relu'), \n",
"# ('Flatten','',''),('Dense',vocab_size,'softmax')]\n",
"\n",
" #-- --- ---- --- ---- --- --- ---- --- ---- --- ---- --- ---- --- --- --- --- ---\n",
" \n",
" print(f'drseuss_text: \\'{drseuss_text}\\'\\nseed_length: {seed_length}\\nepochs: {epochs}\\nbatch_size: {batch_size}'\n",
Expand Down
19 changes: 13 additions & 6 deletions word_based.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,18 +221,25 @@ def trainModelComplete():
#-- -- ---- --- --- --- --- --- ---- --- --- --- --

#-- Model List --- --- --- --- --- --- --- --- --- -- ---- --- --- --- ---- -- --
# modelList = [{'model':'Embedding', 'input_dim':vocab_size, 'output_dim': 256, 'input_length': seq_length},
# {'model': 'LSTM', 'units':256, 'use_bias':True, 'dropout':.2, 'recurrent_dropout': 0, 'return_sequences': True},
# {'model': 'Dense','units':64,'activation':'relu'},
# {'model': 'LSTM', 'units':256, 'use_bias':True, 'dropout':.2, 'recurrent_dropout': 0, 'return_sequences': True},
# {'model': 'Dense','units':64,'activation':'relu'},
# {'model':'Flatten'},
# {'model': 'Dense','units':vocab_size,'activation':'softmax'},
# ]
modelList = [{'model':'Embedding', 'input_dim':vocab_size, 'output_dim': 256, 'input_length': seq_length},
{'model': 'LSTM', 'units':256, 'use_bias':True, 'dropout':.2, 'recurrent_dropout': 0, 'return_sequences': True},
{'model': 'Dense','units':64,'activation':'relu'},
{'model': 'Dense','units':100,'activation':'relu'},
{'model': 'LSTM', 'units':256, 'use_bias':True, 'dropout':.2, 'recurrent_dropout': 0, 'return_sequences': True},
{'model': 'Dense','units':64,'activation':'relu'},
{'model': 'Dense','units':100,'activation':'relu'},
{'model': 'LSTM', 'units':256, 'use_bias':True, 'dropout':.2, 'recurrent_dropout': 0, 'return_sequences': True},
{'model': 'Dense','units':100,'activation':'relu'},
{'model':'Flatten'},
{'model': 'Dense','units':vocab_size,'activation':'softmax'},
]
# modelList = [('Embedding', vocab_size, seq_length), ('LSTM',256,'True'), ('Dense',256,'relu'), ('Dropout',.2,''),
# ('LSTM',128,'True'), ('Dense',128,'relu'), ('Dropout',.2,''),
# ('LSTM', 64,'False'), ('Dense',64,'relu'),
# ('Flatten','',''),('Dense',vocab_size,'softmax')]

#-- --- ---- --- ---- --- --- ---- --- ---- --- ---- --- ---- --- --- --- --- ---

print(f'drseuss_text: \'{drseuss_text}\'\nseed_length: {seed_length}\nepochs: {epochs}\nbatch_size: {batch_size}'
Expand Down

0 comments on commit 5210f5f

Please sign in to comment.