Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from utils.experiment_utils import setup_experiments
- from collections import OrderedDict
- # when running an experiment override the parameter you're interested in
- base_experiment = OrderedDict([
- ('id', 'exp'),
- ('epoch', 10000), # nr epochs
- ('nr_points', 1000), # nr test examples
- ('sensors', np.array([0, 0, 10, 0])), # sensor locations [s1_x, s1_y, s2_x, s2_y .. ]
- ('sigma', 1), # sigma for gaussian noise on output vector
- ('grid_width', 10), # grid width
- ('grid_height', 10), # grid height
- ('nh_1', 4), # nr units in first hidden layer
- ('loss_function', 'categorical_crossentropy'), # loss function
- ('hidden_activation', 'tanh'), # activation for hidden layers
- ('output_activation', 'sigmoid'), # final activation
- ('optimizer', 'adam') # optimizer
- ])
- # what experiments do we want to run
- exp_settings = [
- {'param': 'nh_1', 'values': np.arange(1, 17)}, # test nr hidden layers
- {'param': 'optimizer', 'values': ['sgd', 'adam']}, # optimizing algorithms
- {'param': 'sigma', 'values': [0, 0.5, 1, 2]}, # sigma
- {'param': 'hidden_activation', 'values': ['tanh', 'relu']}, # activation for hidden layer
- {'param': 'output_activation', 'values': ['sigmoid', 'softmax']}, # activation for output layer
- {'param': 'nr_points', 'values': [100, 500, 1000, 2500, 5000, 10000]} # nr training examples
- ]
- experiments = setup_experiments(exp_settings, base_experiment)
Add Comment
Please, Sign In to add comment