From 28b9431362fa1c28729b5353d265f838c0a678ca Mon Sep 17 00:00:00 2001 From: Bethany Lusch Date: Fri, 13 Apr 2018 18:14:07 -0700 Subject: [PATCH] change iteritems() to items() to be compatible with Python 3 --- helperfns.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helperfns.py b/helperfns.py index af97f2c..36d161a 100644 --- a/helperfns.py +++ b/helperfns.py @@ -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])