trainer.py 文件源码

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

项目:multi-gpu-keras-tf 作者: sallamander 项目源码 文件源码
def _get_callbacks(self):
        """Return callbacks to pass into the Model.fit method

        Note: This simply returns statically instantiated callbacks. In the
        future it could be altered to allow for callbacks that are specified
        and configured via a training config.
        """

        fpath_history = os.path.join(self.output_dir, 'history.csv')
        fpath_weights = os.path.join(self.output_dir, 'weights.h5')

        csv_logger = CSVLogger(filename=fpath_history)
        model_checkpoint = ModelCheckpoint(
            filepath=fpath_weights, verbose=True
        )
        callbacks = [csv_logger, model_checkpoint]

        return callbacks
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号