keras_utils.py 文件源码

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

项目:KATE 作者: hugochan 项目源码 文件源码
def on_epoch_end(self, epoch, logs=None):
        """Called at the end of an epoch.
        # Arguments
            epoch: integer, index of epoch.
            logs: dictionary of logs.
        """
        if epoch % self.per_epoch == 0:
            weights = self.model.get_weights()[0]
            # weights /= np.max(np.abs(weights))
            weights = unitmatrix(weights, axis=0) # normalize
            # weights[np.abs(weights) < 1e-2] = 0
            heatmap(weights.T, '%s_%s%s'%(self.filename, epoch, self.ext))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号