@@ -0,0 +1,856 @@
+import os%0Aimport numpy as np%0Aimport sys%0A%0Alabel_file = open('/home/hypan/data/celebA/test.txt', 'r')%0Alines = label_file.readlines()%0Alabel_file.close()%0A%0Aacc = np.zeros(40)%0Acou = 0%0A%0Afor line in lines:%0A    info = line.strip('%5Cr%5Cn').split()%0A    name = info%5B0%5D.split('.')%5B0%5D%0A    gt_labels = info%5B1: %5D%0A    feat_path = '/home/hypan/data/celebA/result/' + sys.argv%5B1%5D + '/test_feature/' + name + '.npy'%0A    if not os.path.exists(feat_path):%0A        print '%7B%7D has not predict feature.'.format(name)%0A    pd_labels = np.load(feat_path)%0A    cnt = len(pd_labels)%0A    for i in range(cnt):%0A        gt_label = int(gt_labels%5Bi%5D)%0A        pd_label = pd_labels%5Bi%5D%0A        if pd_label %3E 0:%0A            pd_label = 1%0A        else:%0A            pd_label = -1%0A        if gt_label == pd_label:%0A            acc%5Bi%5D += 1%0A    cou += 1%0A%0Afor i in range(40):%0A    print i, acc%5Bi%5D * 1.0 / cou%0A

add celeba multitask acc