From 825b10075aef47132e2d21127085758990f51b37 Mon Sep 17 00:00:00 2001
From: Sun Jin Kim <sk2521@ic.ac.uk>
Date: Wed, 27 Apr 2022 15:14:35 +0100
Subject: [PATCH] edit aa_learner.policy_record

---
 MetaAugment/autoaugment_learners/aa_learner.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/MetaAugment/autoaugment_learners/aa_learner.py b/MetaAugment/autoaugment_learners/aa_learner.py
index abccb0a9..a562a3dc 100644
--- a/MetaAugment/autoaugment_learners/aa_learner.py
+++ b/MetaAugment/autoaugment_learners/aa_learner.py
@@ -386,10 +386,11 @@ class aa_learner:
                                     logging = logging,
                                     print_every_epoch=print_every_epoch)
 
+
+        # turn policy into dictionary format and add it into self.policy_record
         curr_pol = f'pol{self.num_pols_tested}'
         pol_dict = {}
         for subpol in policy:
-            subpol = subpol[0]
             first_trans, first_prob, first_mag = subpol[0]
             second_trans, second_prob, second_mag = subpol[1]
             components = (first_prob, first_mag, second_prob, second_mag)
@@ -401,7 +402,6 @@ class aa_learner:
 
         self.num_pols_tested += 1
         
-        # if logging is true, 'accuracy' is actually a tuple: (accuracy, accuracy_log)
 
         return accuracy
     
-- 
GitLab