Closed wang7liang closed 5 years ago
我在使用ConvKNRM模型,发现训练的时候,loss一直不收敛。想调整一下学习率,请问在哪里可以调整学习率。 部分代码如下: model = mz.models.ConvKNRM() model.params['task'] = ranking_task model.params.update(preprocessor.context) model.params['embedding_output_dim'] = 100 model.params['embedding_trainable'] = True model.params['filters'] = 128 model.params['conv_activation_func'] = 'relu' model.params['max_ngram'] = 3 model.params['use_crossmatch'] = True model.params['kernel_num'] = 18 model.params['sigma'] = 0.07 model.params['exact_sigma'] = 0.001 model.params['optimizer'] = 'adadelta' model.guess_and_fill_missing_params() model.build() model.compile()
model.params['optimizer'] = keras.optimizers.Adam(lr=0.001)
谢谢,解决了问题。
我在使用ConvKNRM模型,发现训练的时候,loss一直不收敛。想调整一下学习率,请问在哪里可以调整学习率。 部分代码如下: model = mz.models.ConvKNRM() model.params['task'] = ranking_task model.params.update(preprocessor.context) model.params['embedding_output_dim'] = 100 model.params['embedding_trainable'] = True model.params['filters'] = 128 model.params['conv_activation_func'] = 'relu' model.params['max_ngram'] = 3 model.params['use_crossmatch'] = True model.params['kernel_num'] = 18 model.params['sigma'] = 0.07 model.params['exact_sigma'] = 0.001 model.params['optimizer'] = 'adadelta' model.guess_and_fill_missing_params() model.build() model.compile()