PyTorch torch.mvlgamma 函数

约 257 字 更新于 2026-11-18 5iyo.com

PyTorch torch.mvlgamma 函数


torch.mvlgamma 是 PyTorch 中用于计算逐元素多元 gamma 函数的对数的函数。

函数定义

torch.mvlgamma(input, p, out=None)

使用示例

实例

import torch

# 计算多元 gamma 函数的对数
x = torch.tensor([1.0, 2.0, 3.0])
p = 2
result = torch.mvlgamma(x, p)
print(result)