Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mnist training #38

Merged
merged 2 commits into from
Sep 20, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Clean up evaluation script
  • Loading branch information
nottombrown committed Sep 20, 2018
commit 1ef492462c9bcac94ccffec46e7f1e5384b4f05a
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,22 @@
flags.DEFINE_string("model_dir", "/tmp/two-class-mnist/vanilla",
"Where to load the model to attack from")
flags.DEFINE_integer("num_datapoints", 128,
"How many datapoints to evaluate on")
"How many datapoints to evaluate on")
flags.DEFINE_integer("batch_size", 128,
"Batch size to use during evaluation")

"Batch size to use during evaluation")


def main(_):
mnist = mnist_utils.mnist_dataset(one_hot=False)
mnist_10class = mnist_utils.mnist_dataset(one_hot=False)
dataset_iter = mnist_utils.two_class_iter(
mnist_10class.test.images, mnist_10class.test.labels,
num_datapoints=FLAGS.num_datapoints,
batch_size=FLAGS.batch_size)

eval_kit.evaluate_two_class_mnist_model(
mnist_utils.np_two_class_mnist_model(FLAGS.model_dir),
mnist_utils.two_class_iter(
images=mnist.test.images, labels=mnist.test.labels,
num_datapoints=FLAGS.num_datapoints, batch_size=FLAGS.batch_size),
model_name='datapoints_'+str(FLAGS.num_datapoints))
dataset_iter=dataset_iter,
model_name='datapoints_' + str(FLAGS.num_datapoints))


if __name__ == "__main__":
Expand Down