PyTorch torch.conj_physical 関数
torch.conj_physicalは、PyTorch で要素ごとに物理共役を計算する関数です。
関数定義
torch.conj_physical(input, *, out=None)
使用例
例
import torch
# 物理共役の計算例
x = torch.tensor([1+2j, 3+4j, 5+6j])
result = torch.conj_physical(x)
print(result) # tensor([1-2j, 3-4j, 5-6j])
# 物理共役の計算例
x = torch.tensor([1+2j, 3+4j, 5+6j])
result = torch.conj_physical(x)
print(result) # tensor([1-2j, 3-4j, 5-6j])
その他の拡張機能
Pytorch torch リファレンスマニュアル