diff --git a/examples/nips17_adversarial_competition/run_attacks_and_defenses.py b/examples/nips17_adversarial_competition/run_attacks_and_defenses.py
index <HASH>..<HASH> 100644
--- a/examples/nips17_adversarial_competition/run_attacks_and_defenses.py
+++ b/examples/nips17_adversarial_competition/run_attacks_and_defenses.py
@@ -447,7 +447,7 @@ def compute_and_save_scores_and_ranking(attacks_output,
   # higher scores are better.
   defense_scores = (np.sum(accuracy_on_attacks, axis=0)
                     + np.sum(accuracy_on_targeted_attacks, axis=0))
-  attack_scores = (attacks_output.dataset_image_count
+  attack_scores = (attacks_output.dataset_image_count * len(defenses_output)
                    - np.sum(accuracy_on_attacks, axis=1))
   targeted_attack_scores = np.sum(hit_target_class, axis=1)
   write_ranking(os.path.join(output_dir, 'defense_ranking.csv'),
Fix bug in computation of attack score for Adversarial competition.