import torch
import numpy as np

common_corruptions = ['gaussian_noise', 'shot_noise', 'impulse_noise', 'defocus_blur', 'glass_blur',
                      'motion_blur', 'zoom_blur', 'snow', 'frost', 'fog',
                      'brightness', 'contrast', 'elastic_transform', 'pixelate', 'jpeg_compression']

# for corruption in common_corruptions:
#     data = torch.load('./results/AdvT/{}/accs_lvls.pt'.format(corruption))
#     print(corruption)
#     print(data['adv_accs'])

for corruption in common_corruptions:
    adv_type = 'advT'
    directory = './results/DANN/{}/{}'.format(adv_type, corruption)
    print(corruption)
    temp = []
    for level in [1,2,3,4,5]:
        data = np.load(directory+'/accs_level{}.npy'.format(level))
        temp.append(data[-1])
    print(temp)
