Skip to content

fix: resnet_bpda baseline not set to eval mode - #32

Draft
andrewwhitecdw wants to merge 1 commit into
NVlabs:masterfrom
andrewwhitecdw:bugfix/eval-sde-adv-bpda-b7d8fcbc
Draft

fix: resnet_bpda baseline not set to eval mode#32
andrewwhitecdw wants to merge 1 commit into
NVlabs:masterfrom
andrewwhitecdw:bugfix/eval-sde-adv-bpda-b7d8fcbc

Conversation

@andrewwhitecdw

@andrewwhitecdw andrewwhitecdw commented Jul 27, 2026

Copy link
Copy Markdown

Problem

fix: resnet_bpda baseline not set to eval mode

Fix

Replace:

    resnet_bpda = ResNet_Adv_Model(args, config)
    if ngpus > 1:
        resnet_bpda = torch.nn.DataParallel(resnet_bpda)

    start_time = time.time()
    init_acc = get_accuracy(resnet_bpda, x_val, y_val, bs=adv_batch_size)

with:

    resnet_bpda = ResNet_Adv_Model(args, config).eval()
    if ngpus > 1:
        resnet_bpda = torch.nn.DataParallel(resnet_bpda)

    start_time = time.time()
    init_acc = get_accuracy(resnet_bpda, x_val, y_val, bs=adv_batch_size)

Files changed

  • eval_sde_adv_bpda.py

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

Successfully merging this pull request may close these issues.

1 participant