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

problem with “p-test accuracy” #8

Open
intefirm opened this issue May 3, 2021 · 0 comments
Open

problem with “p-test accuracy” #8

intefirm opened this issue May 3, 2021 · 0 comments

Comments

@intefirm
Copy link

intefirm commented May 3, 2021

Hi, I would like to know the meaning of test accuracy and p-test accuracy in the following code. Is it the accuracy of the attack or the accuracy of the training task?

for batch in iterate_minibatches(X_test, y_test, 500, shuffle=False):
                inputs, targets = batch
                err, acc = val_fn(inputs, targets)
                val_err += err
                val_acc += acc
                val_batches += 1

            for batch in iterate_minibatches(X_test, p_test, 500, shuffle=False):
                inputs, targets = batch
                err, acc = pval_fn(inputs, targets)
                val_perr += err
                val_pacc += acc
                val_pbatches += 1

            sys.stderr.write("Iteration {} of {} took {:.3f}s\n".format(it + 1, num_iteration,
                                                                        time.time() - start_time))
            sys.stderr.write("  test accuracy:\t\t{:.2f} %\n".format(val_acc / val_batches / 500 * 100))
            sys.stderr.write("  p-test accuracy:\t\t{:.2f} %\n".format(val_pacc / val_pbatches / 500 * 100))
            start_time = time.time()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant