NTMC-Community / MatchZoo

Facilitating the design, comparison and sharing of deep text matching models.
Apache License 2.0
3.82k stars 898 forks source link

How to setting learning rate in the model params?? #842

Open gaoliming123 opened 3 years ago

gaoliming123 commented 3 years ago

such as model build, where we can set the learning rate

model = mz.models.MatchPyramid() model.params.update(preprocessor.context) model.params['task'] = ranking_task model.params['embedding_output_dim'] = 128 model.params['embedding_input_dim'] = preprocessor.context['embedding_input_dim'] model.params['embedding_trainable'] = True model.params['num_blocks'] = 2 model.params['kernel_count'] = [8, 16] model.params['kernel_size'] = [[5, 5], [3, 3]] model.params['dpool_size'] = [3, 3] model.params['optimizer'] = 'adam' model.params['dropout_rate'] = 0.3 model.build()
model.compile()