Skip to content

Commit

Permalink
change iteritems() to items() to be compatible with Python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
BethanyL committed Apr 14, 2018
1 parent 255c4b4 commit 28b9431
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions helperfns.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,9 @@ def save_files(sess, csv_path, train_val_error, params, weights, biases):
"""Save error files, weights, biases, and parameters"""
np.savetxt(csv_path, train_val_error, delimiter=',')

for key, value in weights.iteritems():
for key, value in weights.items():
np.savetxt(csv_path.replace('error', key), np.asarray(sess.run(value)), delimiter=',')
for key, value in biases.iteritems():
for key, value in biases.items():
np.savetxt(csv_path.replace('error', key), np.asarray(sess.run(value)), delimiter=',')
params['minTrain'] = np.min(train_val_error[:, 0])
params['minTest'] = np.min(train_val_error[:, 1])
Expand Down

0 comments on commit 28b9431

Please sign in to comment.