anywords.py 文件源码

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

项目:gearbot 作者: g34r 项目源码 文件源码
def train_model(self, batch_size, epochs, path):

        filepath = "./traindata/checkpoints/weights-{epoch:02d}.hdf5"
        checkpoint = ModelCheckpoint(filepath,
                                     monitor='loss',
                                     verbose=1,
                                     save_best_only=True,
                                     mode='min')
        callbacks_list = [checkpoint]

        self.model.fit(self.x_data,
                       self.y_data,
                       batch_size=batch_size,
                       epochs=epochs,
                       callbacks=callbacks_list)
        self.model.save_weights(path)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号