class_docstr: Dialect op for 1-D FFT. As PyTorch's FFT API has a much more fine-grained control than
  TensorFlow's, the parameters of this dialect op mainly follows `torch.fft.fft`.
  
  Parameters
  ----------
  data: tensor<\*D, T> (Required)
      * The input tensor.
  n: const i32 (Optional. Default=None)
      * Signal length. If given, the input will either be zero-padded or trimmed to this length
        before computing the FFT.
  dim: const i32 (Optional. Default=``-1``)
      * The dimension along which to take the one dimensional FFT.
  norm: const str (Optional. Default=``backward``)
      * Normalization mode. For the forward transform (fft()), these correspond to:
          * "forward" - normalize by 1/n
          * "backward" - no normalization
          * "ortho" - normalize by 1/sqrt(n) (making the FFT orthonormal)
      * Calling the backward transform (ifft()) with the same normalization mode will apply an
        overall normalization of 1/n between the two transforms. This is required to make ifft()
        the exact inverse.
      * Default is "backward" (no normalization).
  
  Returns
  -------
  tensor<\*V, complex64>
      * A complex tensor where real and imag parts have the same shape.
      * If ``n`` is None, real's and imag's shapes are same as the input.
      * If ``n`` is specified, shape is ``V[dim]=n``.
  
  Attributes
  ----------
  T: fp32, complex64
  
  References
  ----------
  See `torch.fft.fft <https://pytorch.org/docs/stable/generated/torch.fft.fft.html>`_.
class_docstr_tok: ["Dialect","op","for","1-D","FFT",".","As","PyTorch","'s","FFT","API","has","a","much","more","fine-grained","control","than","TensorFlow","'s",",","the","parameters","of","this","dialect","op","mainly","follows","`","torch.fft.fft","`",".","Parameters","--","--","--","--","--","data",":","tensor","<","\\","*","D",",","T",">","(","Required",")","*","The","input","tensor",".","n",":","const","i32","(","Optional",".","Default=None",")","*","Signal","length",".","If","given",",","the","input","will","either","be","zero-padded","or","trimmed","to","this","length","before","computing","the","FFT",".","dim",":","const","i32","(","Optional",".","Default=","``","-1","``",")","*","The","dimension","along","which","to","take","the","one","dimensional","FFT",".","norm",":","const","str","(","Optional",".","Default=","``","backward","``",")","*","Normalization","mode",".","For","the","forward","transform","(","fft","(",")",")",",","these","correspond","to",":","*","``","forward","''","-","normalize","by","1\/n","*","``","backward","''","-","no","normalization","*","``","ortho","''","-","normalize","by","1\/sqrt","(","n",")","(","making","the","FFT","orthonormal",")","*","Calling","the","backward","transform","(","ifft","(",")",")","with","the","same","normalization","mode","will","apply","an","overall","normalization","of","1\/n","between","the","two","transforms",".","This","is","required","to","make","ifft","(",")","the","exact","inverse",".","*","Default","is","``","backward","''","(","no","normalization",")",".","Returns","--","--","--","-","tensor","<","\\","*","V",",","complex64",">","*","A","complex","tensor","where","real","and","imag","parts","have","the","same","shape",".","*","If","``","n","``","is","None",",","real","'s","and","imag","'s","shapes","are","same","as","the","input",".","*","If","``","n","``","is","specified",",","shape","is","``","V","[","dim","]","=n","``",".","Attributes","--","--","--","--","--","T",":","fp32",",","complex64","References","--","--","--","--","--","See","`","torch.fft.fft","<","https",":","\/\/pytorch.org\/docs\/stable\/generated\/torch.fft.fft.html",">","`","_","."]
code: def type_inference(self):
      if self.norm.val not in _FFT_VALID_NORMS:
          raise ValueError(
              f"Invalid norm param. Valid options are {_FFT_VALID_NORMS}"
          )
      output_type = (
          self.data.dtype
          if types.is_complex(self.data.dtype)
          else types.complex64
      )
      # The shape of FFT output is determined by `n` and `dim`.
      output_shape = list(self.data.shape)
      n, dim = fft_canonicalize_length_dim(self.data, self.n, self.dim)
      output_shape[dim] = n
      return types.tensor(output_type, tuple(output_shape))
  
imports: from typing import Optional, Tuple
  import numpy
  from coremltools.converters.mil.mil import Operation, types
  from coremltools.converters.mil.mil.input_type import DefaultInputs, InputSpec, TensorInputType
  from coremltools.converters.mil.mil.ops.registry import SSAOpRegistry
  from coremltools.converters.mil.mil.types.symbolic import any_symbolic, is_symbolic
  from coremltools.converters.mil.mil.types.type_mapping import infer_complex_dtype, infer_fp_dtype_from_complex
  from coremltools.converters.mil.mil.var import ComplexVar, Var
label_desc: Use image node_id 2 for calling the complex_fft obj's underlying member method code with example usage: obj.type_inference() and returns: types