Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
vhminh2210 authored Apr 22, 2023
1 parent e33a588 commit 5b40130
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Nas-bench-201.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,19 @@ def Make_bench_string(Arch):
ops_Arch.append(str(node_ops[Arch[i]]))
return '|{}~0|+|{}~0|{}~1|+|{}~0|{}~1|{}~2|'.format(ops_Arch[0],ops_Arch[1],ops_Arch[3],ops_Arch[2],ops_Arch[4],ops_Arch[5])

Arch = [6,7,1,5,1,7]

Arch = [1, 1, 5, 1, 1, 1]
api = API('NAS-Bench-201-v1_1-096897.pth', verbose=False)
Arch_string = Make_bench_string(Arch)
# # Arch_string = '|nor_conv_3x3~0|+|nor_conv_3x3~0|nor_conv_3x3~1|+|skip_connect~0|nor_conv_3x3~1|nor_conv_3x3~2|'

index = api.query_index_by_arch(Arch_string)
api.show(index)

# Best_arch_CIFAR-10 = [6, 6, 7, 6, 6, 5]
# Best_arch_CIFAR-100 = [6,6,7,6,6,6]

# best_arch_index, highest_valid_accuracy = api.find_best(dataset='cifar100', metric_on_set='test', hp='200')

# print('The best architecture on CIFAR-100 test set with 200-epoch training is: [{:}] {:}'.format(best_arch_index, api.arch(best_arch_index)))

# print(highest_valid_accuracy)

0 comments on commit 5b40130

Please sign in to comment.