if __name__ == '__main__': parser = argparse.ArgumentParser("Analysis of NAS-Bench-201") parser.add_argument('--api_path', type=str, default=None, help='The path to the NAS-Bench-201 benchmark file.') args = parser.parse_args() meta_file = Path(args.api_path) assert meta_file.exists(), 'invalid path for api : {:}'.format(meta_file) api = API(str(meta_file)) # This will show the results of the best architecture based on the validation set of each dataset. arch_index, accuracy = api.find_best('cifar10-valid', 'x-valid', None, None, False) print( 'FOR CIFAR-010, using the hyper-parameters with 200 training epochs :::' ) print('arch-index={:5d}, arch={:}'.format(arch_index, api.arch(arch_index))) api.show(arch_index) print('') arch_index, accuracy = api.find_best('cifar100', 'x-valid', None, None, False) print( 'FOR CIFAR-100, using the hyper-parameters with 200 training epochs :::' ) print('arch-index={:5d}, arch={:}'.format(arch_index, api.arch(arch_index)))
parser = argparse.ArgumentParser("Analysis of NAS-Bench-201") parser.add_argument( "--api_path", type=str, default=None, help="The path to the NAS-Bench-201 benchmark file.", ) args = parser.parse_args() meta_file = Path(args.api_path) assert meta_file.exists(), "invalid path for api : {:}".format(meta_file) api = API(str(meta_file)) # This will show the results of the best architecture based on the validation set of each dataset. arch_index, accuracy = api.find_best("cifar10-valid", "x-valid", None, None, False) print( "FOR CIFAR-010, using the hyper-parameters with 200 training epochs :::" ) print("arch-index={:5d}, arch={:}".format(arch_index, api.arch(arch_index))) api.show(arch_index) print("") arch_index, accuracy = api.find_best("cifar100", "x-valid", None, None, False) print( "FOR CIFAR-100, using the hyper-parameters with 200 training epochs :::" ) print("arch-index={:5d}, arch={:}".format(arch_index, api.arch(arch_index)))