Skip to content

Commit ddeb86e

Browse files
author
Vineet John
committed
Added log message for training accuracy; Added Pythonpath to bash script
1 parent d48c985 commit ddeb86e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

tensorflow-mnist/processors/softmax_regression_processor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ def process(self):
3939
# Test trained model
4040
correct_prediction = tf.equal(tf.argmax(y, 1), tf.argmax(y_, 1))
4141
accuracy = tf.reduce_mean(tf.cast(correct_prediction, tf.float32))
42+
log.info("train_accuracy: " + str(sess.run(accuracy, feed_dict={x: mnist.train.images, y_: mnist.train.labels})))
4243
log.info("test_accuracy: " + str(sess.run(accuracy, feed_dict={x: mnist.test.images, y_: mnist.test.labels})))
4344

4445
log.info("SoftmaxRegressionProcessor concluded")

tensorflow-mnist/scripts/run-tensorflow-mnist.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ CODEDIR=$(dirname "$0")"/../"
99
/usr/bin/python3 "$CODEDIR"/tensorflow_mnist.py --mode cnn
1010

1111
# Run Fully-Connected Feedforward neural net
12-
/usr/bin/python3 "$CODEDIR"/processors/fully_connected_network_processor.py
12+
PYTHONPATH="$CODEDIR" /usr/bin/python3 "$CODEDIR"/processors/fully_connected_network_processor.py

0 commit comments

Comments
 (0)