callbacks.py 文件源码

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

项目:mctest-model 作者: Maluuba 项目源码 文件源码
def __init__(self, monitor='val_loss', cut_ratio=0.5, patience=2, scheduled_start_epoch=1, scheduled_cut_ratio=1.):
        """
        Args:
            monitor: quantity to be monitored.
            cut_ratio: cut the learning rate by this percent.
            patience: number of epochs with no improvement
                after which training will be stopped.
            scheduled_start_epoch: from which epoch to do scheduled learning rate discount
            scheduled_cut_ratio: learning rate discount ratio.
        """
        super(Callback, self).__init__()
        self.monitor = monitor
        self.patience = patience
        self.best = np.Inf
        self.wait = 0
        self.cut_ratio = cut_ratio
        self.monitor_decrease = False
        self.scheduled_start_epoch = scheduled_start_epoch
        self.scheduled_cut_ratio = scheduled_cut_ratio
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号