Open wby1999 opened 4 years ago
tf1.14中改为:tf.estimator.experimental.stop_if_no_decrease_hook 其他参数不变,然后无论怎么调整max_steps_without_decrease根本不会提前停止啊,好像没起作用。
tf1.14中改为:tf.estimator.experimental.stop_if_no_decrease_hook 其他参数不变,然后无论怎么调整max_steps_without_decrease根本不会提前停止啊,好像没起作用。
我这里会,我设的1000,原本要训练9900step,现在5001step就停下来了
简单说三种: 1.写hook,放到estimator中 2.使用bert4keras 写hook
如果你认为loss不再下降的时候,就是最好的模型,可以直接参考代码中的early stop 的使用(具体使用,参考官方文档。)。