PyTorch torch.is_conj Function


Pytorch torch 参考手册Pytorch torch Reference Manual

torch.is_conjis a function in PyTorch used to check whether a tensor is a conjugate tensor.

Function Definition

torch.is_conj(input)

Usage Example

Example

import torch

x = torch.tensor([1+2j, 3+4j])
print(torch.is_conj(x))

# Create a conjugate tensor
y = torch.conj(x)
print(torch.is_conj(y))

Pytorch torch 参考手册Pytorch torch Reference Manual

Other Extensions