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
# https://people.eecs.berkeley.edu/~kjamieson/hyperband.html | |
# you need to write the following hooks for your custom problem | |
from problem import get_random_hyperparameter_configuration,run_then_return_val_loss | |
max_iter = 81 # maximum iterations/epochs per configuration | |
eta = 3 # defines downsampling rate (default=3) | |
logeta = lambda x: log(x)/log(eta) | |
s_max = int(logeta(max_iter)) # number of unique executions of Successive Halving (minus one) | |
B = (s_max+1)*max_iter # total number of iterations (without reuse) per execution of Succesive Halving (n,r) |
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
import numpy as np | |
from keras.layers import GRU, initializations, K | |
from collections import OrderedDict | |
class GRULN(GRU): | |
'''Gated Recurrent Unit with Layer Normalization | |
Current impelemtation only works with consume_less = 'gpu' which is already | |
set. | |
# Arguments |