Closed tuningManBin closed 4 months ago
Hi,
the benchmark
function takes a batch_size
argument https://github.com/RobustBench/robustbench/blob/b98426d7a0112f738333b321b1c3e3ebb302922f/robustbench/eval.py#L32
Depending on your use-case, e.g. development, you might also just use a subset of the test set (setting n_examples
to a smaller value).
Hope this helps.
Thank you for your response; it has been very helpful to me :).
Hi, thank you for providing the powerful testing tool. In my project, I found that the running speed of robustness testing using RobustBench
clean_acc, robust_acc = benchmark(model, model_name=model_name, n_examples=10000, dataset="cifar10", threat_model=threat_model, eps=8/255, device=device, to_disk=True)
is very slow. Is there a corresponding hyperparameter that can adjust the batch size during the running process?