Skip to content
Snippets Groups Projects
Commit 75083fc3 authored by Max Ramsay King's avatar Max Ramsay King
Browse files

pol_dict bug

parent 825b1007
No related branches found
No related tags found
No related merge requests found
Pipeline #272306 passed
......@@ -394,15 +394,16 @@ class aa_learner:
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)
if second_trans in pol_dict[first_trans]:
pol_dict[first_trans][second_trans].append(components)
if first_trans in pol_dict:
if second_trans in pol_dict[first_trans]:
pol_dict[first_trans][second_trans].append(components)
else:
pol_dict[first_trans]= {second_trans: [components]}
else:
pol_dict[first_trans]= {second_trans: [components]}
self.policy_record[curr_pol] = (pol_dict, accuracy)
self.num_pols_tested += 1
return accuracy
......
import torch
import numpy as np
from MetaAugment.autoaugment_learners.randomsearch_learner import randomsearch_learner
class rand_augment_learner(randomsearch_learner):
def __init__(self):
pass
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment