Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
nasavish committed Oct 24, 2018
2 parents 55aa248 + 4e53f4e commit 428adac
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions info_2018-10-22_11-31.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{'model': 'Embedding', 'input_dim': 2830, 'output_dim': 256, 'input_length': 50}, {'model': 'LSTM', 'units': 256, 'use_bias': True, 'dropout': 0.2, 'recurrent_dropout': 0, 'return_sequences': True}, {'model': 'Dense', 'units': 64, 'activation': 'relu'}, {'model': 'LSTM', 'units': 256, 'use_bias': True, 'dropout': 0.2, 'recurrent_dropout': 0, 'return_sequences': True}, {'model': 'Dense', 'units': 64, 'activation': 'relu'}, {'model': 'Flatten'}, {'model': 'Dense', 'units': 2830, 'activation': 'softmax'}]{'loss': [6.813, 6.3438, 6.0809, 5.668, 5.0674, 4.1888, 3.2263, 2.4416, 1.8358, 1.3483, 0.9936, 0.7174, 0.5278, 0.3948, 0.2838, 0.2132, 0.1515, 0.1078, 0.0862, 0.0653, 0.0591, 0.0499, 0.0395, 0.0275, 0.0271, 0.0293, 0.037, 0.0441, 0.0782, 0.1003, 0.0644, 0.0407, 0.0296, 0.0202, 0.0133, 0.0067, 0.0048, 0.0053, 0.005, 0.0076, 0.012, 0.0162, 0.0466, 0.1344, 0.1101, 0.06, 0.0288, 0.0118, 0.0063], 'acc': [0.0366, 0.0477, 0.0514, 0.0527, 0.0647, 0.1239, 0.1239, 0.4201, 0.5374, 0.6495, 0.7304, 0.7957, 0.8472, 0.8845, 0.9168, 0.9394, 0.9593, 0.9714, 0.9791, 0.9854, 0.9866, 0.99, 0.9918, 0.9948, 0.9946, 0.9945, 0.9913, 0.9897, 0.9782, 0.9701, 0.9821, 0.9881, 0.9925, 0.9952, 0.9975, 0.9991, 0.9997, 0.9996, 0.9996, 0.9987, 0.9984, 0.9962, 0.9854, 0.957, 0.9661, 0.9805, 0.9917, 0.9974, 0.9993], 'seq_length': 50, 'total_sequences': 16175, 'epochs':50, 'batch_size':128}
1 change: 1 addition & 0 deletions loss_history_2018-10-23_12-32.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{'loss': [6.7007021255729, 5.962286518545018], 'acc': [0.03876352395476569, 0.05403400308923246]}
4 changes: 2 additions & 2 deletions word_based.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -255,7 +255,7 @@
" #-- Fit model -- ---- --- --- --- ---- --- --- ---- --- --- --- --- --- --- --- --- \n",
" history_callback = modelFit(model, modelName, X, y, seq_length, batch_size, epochs, results_path)\n",
" loss_history = history_callback.history\n",
" with open(results_path.rstrip('/').lstrip('/') + f'/{modelName}_loss_history.txt', 'w+') as f:\n",
" with open(results_path.rstrip('/').lstrip('/') + f'/loss_history_{modelName}.txt', 'w+') as f:\n",
" f.write(str(loss_history))"
]
},
Expand Down
4 changes: 2 additions & 2 deletions word_based.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def defineModel(vocab_size, seq_length, modelList, length, input_shape):
return model, modelName


# In[7]:
# In[13]:


def trainModelComplete(results_path):
Expand Down Expand Up @@ -235,7 +235,7 @@ def trainModelComplete(results_path):
#-- Fit model -- ---- --- --- --- ---- --- --- ---- --- --- --- --- --- --- --- ---
history_callback = modelFit(model, modelName, X, y, seq_length, batch_size, epochs, results_path)
loss_history = history_callback.history
with open(results_path.rstrip('/').lstrip('/') + f'/{modelName}_loss_history.txt', 'w+') as f:
with open(results_path.rstrip('/').lstrip('/') + f'/loss_history_{modelName}.txt', 'w+') as f:
f.write(str(loss_history))


Expand Down

0 comments on commit 428adac

Please sign in to comment.