Created
April 14, 2019 21:36
-
-
Save archydeberker/380757cf933aa0a72ba85355946df225 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def random_hyperparamters(): | |
""" Returns randomly drawn hyperparamters for our CNN" | |
hyperparam_dict = {} | |
hyperparam_dict['lr'] = 10 ** np.random.uniform(-6, -1) | |
hyperparam_dict['weight_decay'] = 10 ** np.random.uniform(-6, -3) | |
hyperparam_dict['momentum'] = 10 ** np.random.uniform(-1, 0) | |
hyperparam_dict['conv1_size'] = int(np.random.uniform(10,100)) | |
hyperparam_dict['conv2_size'] = int(np.random.uniform(10,100)) | |
hyperparam_dict['fc1_size'] = int(np.random.uniform(30,200)) | |
hyperparam_dict['fc2_size'] = int(np.random.uniform(30,200)) | |
return hyperparam_dict |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment