Fonction torch.is_conj de PyTorch
Manuel de référence Pytorch torch
torch.is_conjest une fonction de PyTorch utilisée pour vérifier si un tenseur est un tenseur conjugué.
Définition de fonction
torch.is_conj(input)
Exemple d'utilisation
Exemple
import torch
x = torch.tensor([1+2j, 3+4j])
print(torch.is_conj(x))
# Créer un tenseur conjugué
y = torch.conj(x)
print(torch.is_conj(y))
x = torch.tensor([1+2j, 3+4j])
print(torch.is_conj(x))
# Créer un tenseur conjugué
y = torch.conj(x)
print(torch.is_conj(y))
Autres extensions