Skip to content

Commit

Permalink
adf
Browse files Browse the repository at this point in the history
  • Loading branch information
jshtaway committed Oct 24, 2018
1 parent 28b4bca commit 16f7b85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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 16f7b85

Please sign in to comment.