test_triang.py 文件源码

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

项目:GPflow 作者: GPflow 项目源码 文件源码
def reference_inverse(self, matrices):
        # This is the inverse operation of the vec_to_tri op being tested.
        D, N, _ = matrices.shape
        M = (N * (N + 1)) // 2
        tril_indices = np.tril_indices(N)
        output = np.zeros((D, M))
        for vector_index in range(D):
            matrix = matrices[vector_index, :]
            output[vector_index, :] = matrix[tril_indices]
        return output
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号