config.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:keras-image-captioning 作者: danieljl 项目源码 文件源码
def __init__(self, fixed_config_keys):
        super(Embed300RandomConfigBuilder, 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: 8
        self._lemmatize_caption = lambda: True
        self._rare_words_handling = lambda: 'discard'
        self._words_min_occur = lambda: 5
        self._bidirectional_rnn = lambda: False
        self._initializer = lambda: 'glorot_uniform'
        self._word_vector_init = lambda: choice(['glove', 'fasttext'])

        self._l1_reg = lambda: 0.0
        self._l2_reg = lambda: 0.0

        self._embedding_size = lambda: 300
        self._rnn_output_size = lambda: 300
        self._rnn_type = lambda: 'lstm'
        self._rnn_layers = lambda: randint(1, 2)

        self._learning_rate = lambda: 10**uniform(-4, -2)
        self._dropout_rate = lambda: uniform(0.1, 0.6)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号