I have a tensor of shape
torch.Size([128, 1, 480]) and I want to get the maximum value of the tensor. The tensor has float complex numbers and I am running my code on CPU, but the code results in the following error:
RuntimeError: “max_cpu” not implemented for ‘ComplexFloat’
It seems that the max function is not implemented for running on CPU yet. Is there any alternatives to use instead?
Thanks in advance.in
You’ll need to define what you mean by max value for complex numbers. You have a few options:
- Max real value;
- Max imaginary value;
- Max absolute value or magnitude;
- Max complex angle.