From 03e3d8033e10072280b140f52932ec39b739f1d1 Mon Sep 17 00:00:00 2001 From: Peter Mitrano Date: Thu, 18 May 2017 22:47:26 -0400 Subject: [PATCH] running with flipped sign eigenvectors they diffinetly match the paper, but the sign is wrong for some of them maybe it various over different runs? tensorboard log-dir: log_data/May_18/May_18_22:47:26/ tensorboard log-dir: --- dataset_utils.py | 2 +- pcanet.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dataset_utils.py b/dataset_utils.py index c9cc4d6..9539657 100644 --- a/dataset_utils.py +++ b/dataset_utils.py @@ -52,7 +52,7 @@ def load(name): info = datasets[name] - batch_size = 1000 + batch_size = 500 with tf.name_scope('input'): filename_queue = tf.train.string_input_producer([info.TRAIN_RECORD_PATH], name='train_queue') diff --git a/pcanet.py b/pcanet.py index 3b2a488..f78f7fd 100755 --- a/pcanet.py +++ b/pcanet.py @@ -203,9 +203,9 @@ def main(): train_pcanet_features, train_labels, summary = sess.run([m.output_features, train_label_batch, merged_summary]) writer.add_summary(summary, 0) - q = sess.run(m.x_eig1) - np.savetxt('eig.csv', np.squeeze(q)) - exit(0) + # q = sess.run(m.x_eig1) + # np.savetxt('eig.csv', np.squeeze(q)) + # exit(0) # train linear SVM svm = LinearSVC(C=1, fit_intercept=False) @@ -220,7 +220,7 @@ def main(): scores = [] test_labels = sess.run(test_label_batch) m.image_batch = test_image_batch - for i in range(10): + for i in range(4): test_pcanet_features = sess.run(m.output_features) score = svm.score(test_pcanet_features, test_labels)