def __init__(self, fixed_config_keys):
super(CoarseRandomConfigBuilder, self).__init__(fixed_config_keys)
self._batch_size = lambda: 32
self._reduce_lr_factor = lambda: 1.0 - 1e-6
self._reduce_lr_patience = lambda: sys.maxsize
self._early_stopping_patience = lambda: 4
self._lemmatize_caption = lambda: True
self._rare_words_handling = lambda: 'nothing'
self._words_min_occur = lambda: 1
self._bidirectional_rnn = lambda: False
self._initializer = lambda: 'he_normal'
self._word_vector_init = lambda: None
self._learning_rate = lambda: 10 ** uniform(-6, -2)
self._dropout_rate = lambda: uniform(0, 1)
self._l1_reg = lambda: 10 ** uniform(-7, 0)
self._l2_reg = lambda: 10 ** uniform(-7, 0)
self._embedding_size = lambda: int(2 ** uniform(6, 9)) # [64, 512]
self._rnn_output_size = lambda: int(2 ** uniform(6, 9)) # [64, 512]
self._rnn_type = lambda: choice(['lstm', 'gru'])
self._rnn_layers = lambda: randint(1, 5)
评论列表
文章目录