RuntimeError: "max_cpu" not implemented for 'ComplexFloat'

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

You’ll need to define what you mean by max value for complex numbers. You have a few options:

  1. Max real value;
  2. Max imaginary value;
  3. Max absolute value or magnitude;
  4. Max complex angle.