SymbolicValueError: STFT does not currently support complex types
State: open | Pull request: no
Labels: name: bug

name: stale

**Describe the bug**

I am trying to export the preprocessor class of Quartznet model to onnx. My requirement is to run preprocessing in a non-python environment. However, the export is failing.

**Steps/Code to reproduce bug**

The bug can be reproduced using  the following code - 

```
quartznet = nemo_asr.models.EncDecCTCModel.from_pretrained(model_name="QuartzNet15x5Base-En")

preprocessor = quartznet.preprocessor.to(device)

preprocessor.eval()

preprocessor.export("prep.onnx", onnx_opset_version=17)

``` 
The following error is produced:

```
{
	"name": "SymbolicValueError",
	"message": "STFT does not currently support complex types  [Caused by the value '97 defined in (%97 : Float(*, *, strides=[2946, 1], requires_grad=0, device=cpu) = onnx::Reshape[allowzero=0](%86, %96), scope: nemo.collections.asr.modules.audio_preprocessing.AudioToMelSpectrogramPreprocessor::/nemo.collections.asr.parts.preprocessing.features.FilterbankFeatures::featurizer # /home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/functional.py:703:0
)' (type 'Tensor') in the TorchScript graph. The containing node has kind 'onnx::Reshape'.] 
    (node defined in /home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/functional.py(703): stft
/home/ik/Documents/aakhor/asr/NeMo/nemo/collections/asr/parts/preprocessing/features.py(308): <lambda>
/home/ik/Documents/aakhor/asr/NeMo/nemo/collections/asr/parts/preprocessing/features.py(423): forward
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/utils/_contextlib.py(116): decorate_context
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/nn/modules/module.py(1726): _slow_forward
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/nn/modules/module.py(1747): _call_impl
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/nn/modules/module.py(1736): _wrapped_call_impl
/home/ik/Documents/aakhor/asr/NeMo/nemo/collections/asr/modules/audio_preprocessing.py(292): get_features
/home/ik/Documents/aakhor/asr/NeMo/nemo/collections/asr/modules/audio_preprocessing.py(91): forward
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/utils/_contextlib.py(116): decorate_context
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/nn/modules/module.py(1726): _slow_forward
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/nn/modules/module.py(1747): _call_impl
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/nn/modules/module.py(1736): _wrapped_call_impl
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/jit/_trace.py(130): wrapper
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/jit/_trace.py(139): forward
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/nn/modules/module.py(1747): _call_impl
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/nn/modules/module.py(1736): _wrapped_call_impl
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/jit/_trace.py(1500): _get_trace_graph
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/onnx/utils.py(904): _trace_and_get_graph_from_model
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/onnx/utils.py(997): _create_jit_graph
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/onnx/utils.py(1113): _model_to_graph
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/onnx/utils.py(1564): _export
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/onnx/utils.py(502): export
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/onnx/__init__.py(375): export
/home/ik/Documents/aakhor/asr/NeMo/nemo/core/classes/exportable.py(221): _export
/home/ik/Documents/aakhor/asr/NeMo/nemo/core/classes/exportable.py(114): export
/tmp/ipykernel_10033/3317768717.py(8): <module>
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/IPython/core/interactiveshell.py(3577): run_code
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/IPython/core/interactiveshell.py(3517): run_ast_nodes
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/IPython/core/interactiveshell.py(3334): run_cell_async
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/IPython/core/async_helpers.py(128): _pseudo_sync_runner
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/IPython/core/interactiveshell.py(3130): _run_cell
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/IPython/core/interactiveshell.py(3075): run_cell
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/ipykernel/zmqshell.py(549): run_cell
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/ipykernel/ipkernel.py(449): do_execute
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/ipykernel/kernelbase.py(778): execute_request
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/ipykernel/ipkernel.py(362): execute_request
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/ipykernel/kernelbase.py(437): dispatch_shell
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/ipykernel/kernelbase.py(534): process_one
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/ipykernel/kernelbase.py(545): dispatch_queue
/home/ik/miniconda3/envs/nemo/lib/python3.11/asyncio/events.py(84): _run
/home/ik/miniconda3/envs/nemo/lib/python3.11/asyncio/base_events.py(1936): _run_once
/home/ik/miniconda3/envs/nemo/lib/python3.11/asyncio/base_events.py(608): run_forever
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/tornado/platform/asyncio.py(205): start
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/ipykernel/kernelapp.py(739): start
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/traitlets/config/application.py(1075): launch_instance
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/ipykernel_launcher.py(18): <module>
<frozen runpy>(88): _run_code
<frozen runpy>(198): _run_module_as_main
)

    Inputs:
        #0: 86 defined in (%86 : Float(*, *, *, strides=[2946, 2946, 1], requires_grad=0, device=cpu) = onnx::Pad[mode=\"reflect\"](%59, %85), scope: nemo.collections.asr.modules.audio_preprocessing.AudioToMelSpectrogramPreprocessor::/nemo.collections.asr.parts.preprocessing.features.FilterbankFeatures::featurizer # /home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/nn/functional.py:5096:0
    )  (type 'Tensor')
        #1: 96 defined in (%96 : int[] = prim::ListConstruct(%90, %95), scope: nemo.collections.asr.modules.audio_preprocessing.AudioToMelSpectrogramPreprocessor::/nemo.collections.asr.parts.preprocessing.features.FilterbankFeatures::featurizer
    )  (type 'List[int]')
    Outputs:
        #0: 97 defined in (%97 : Float(*, *, strides=[2946, 1], requires_grad=0, device=cpu) = onnx::Reshape[allowzero=0](%86, %96), scope: nemo.collections.asr.modules.audio_preprocessing.AudioToMelSpectrogramPreprocessor::/nemo.collections.asr.parts.preprocessing.features.FilterbankFeatures::featurizer # /home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/functional.py:703:0
    )  (type 'Tensor')",
	"stack": "---------------------------------------------------------------------------
SymbolicValueError                        Traceback (most recent call last)
Cell In[10], line 8
      4 preprocessor = quartznet.preprocessor.to(device)
      6 preprocessor.eval()
----> 8 preprocessor.export(\"prep.onnx\", onnx_opset_version=18)

File ~/Documents/aakhor/asr/NeMo/nemo/core/classes/exportable.py:114, in Exportable.export(self, output, input_example, verbose, do_constant_folding, onnx_opset_version, check_trace, dynamic_axes, check_tolerance, export_modules_as_functions, keep_initializers_as_inputs)
    112 model = self.get_export_subnet(subnet_name)
    113 out_name = augment_filename(output, subnet_name)
--> 114 out, descr, out_example = model._export(
    115     out_name,
    116     input_example=input_example,
    117     verbose=verbose,
    118     do_constant_folding=do_constant_folding,
    119     onnx_opset_version=onnx_opset_version,
    120     check_trace=check_trace,
    121     dynamic_axes=dynamic_axes,
    122     check_tolerance=check_tolerance,
    123     export_modules_as_functions=export_modules_as_functions,
    124     keep_initializers_as_inputs=keep_initializers_as_inputs,
    125 )
    126 # Propagate input example (default scenario, may need to be overriden)
    127 if input_example is not None:

File ~/Documents/aakhor/asr/NeMo/nemo/core/classes/exportable.py:221, in Exportable._export(self, output, input_example, verbose, do_constant_folding, onnx_opset_version, check_trace, dynamic_axes, check_tolerance, export_modules_as_functions, keep_initializers_as_inputs)
    219     dynamic_axes = get_dynamic_axes(self.input_module.input_types_for_export, input_names)
    220     dynamic_axes.update(get_dynamic_axes(self.output_module.output_types_for_export, output_names))
--> 221 torch.onnx.export(
    222     jitted_model,
    223     input_example,
    224     output,
    225     input_names=input_names,
    226     output_names=output_names,
    227     verbose=verbose,
    228     do_constant_folding=do_constant_folding,
    229     dynamic_axes=dynamic_axes,
    230     opset_version=onnx_opset_version,
    231     keep_initializers_as_inputs=keep_initializers_as_inputs,
    232     export_modules_as_functions=export_modules_as_functions,
    233 )
    235 if check_trace:
    236     verify_runtime(self, output, check_trace_input, input_names, check_tolerance=check_tolerance)

File ~/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/onnx/__init__.py:375, in export(model, args, f, kwargs, export_params, verbose, input_names, output_names, opset_version, dynamic_axes, keep_initializers_as_inputs, dynamo, external_data, dynamic_shapes, report, verify, profile, dump_exported_program, artifacts_dir, fallback, training, operator_export_type, do_constant_folding, custom_opsets, export_modules_as_functions, autograd_inlining, **_)
    369 if dynamic_shapes:
    370     raise ValueError(
    371         \"The exporter only supports dynamic shapes \"
    372         \"through parameter dynamic_axes when dynamo=False.\"
    373     )
--> 375 export(
    376     model,
    377     args,
    378     f,  # type: ignore[arg-type]
    379     kwargs=kwargs,
    380     export_params=export_params,
    381     verbose=verbose is True,
    382     input_names=input_names,
    383     output_names=output_names,
    384     opset_version=opset_version,
    385     dynamic_axes=dynamic_axes,
    386     keep_initializers_as_inputs=keep_initializers_as_inputs,
    387     training=training,
    388     operator_export_type=operator_export_type,
    389     do_constant_folding=do_constant_folding,
    390     custom_opsets=custom_opsets,
    391     export_modules_as_functions=export_modules_as_functions,
    392     autograd_inlining=autograd_inlining,
    393 )
    394 return None

File ~/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/onnx/utils.py:502, in export(model, args, f, kwargs, export_params, verbose, training, input_names, output_names, operator_export_type, opset_version, do_constant_folding, dynamic_axes, keep_initializers_as_inputs, custom_opsets, export_modules_as_functions, autograd_inlining)
    499 if kwargs is not None:
    500     args = args + (kwargs,)
--> 502 _export(
    503     model,
    504     args,
    505     f,
    506     export_params,
    507     verbose,
    508     training,
    509     input_names,
    510     output_names,
    511     operator_export_type=operator_export_type,
    512     opset_version=opset_version,
    513     do_constant_folding=do_constant_folding,
    514     dynamic_axes=dynamic_axes,
    515     keep_initializers_as_inputs=keep_initializers_as_inputs,
    516     custom_opsets=custom_opsets,
    517     export_modules_as_functions=export_modules_as_functions,
    518     autograd_inlining=autograd_inlining,
    519 )
    521 return None

File ~/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/onnx/utils.py:1564, in _export(model, args, f, export_params, verbose, training, input_names, output_names, operator_export_type, export_type, opset_version, do_constant_folding, dynamic_axes, keep_initializers_as_inputs, fixed_batch_size, custom_opsets, add_node_names, onnx_shape_inference, export_modules_as_functions, autograd_inlining)
   1561     dynamic_axes = {}
   1562 _validate_dynamic_axes(dynamic_axes, model, input_names, output_names)
-> 1564 graph, params_dict, torch_out = _model_to_graph(
   1565     model,
   1566     args,
   1567     verbose,
   1568     input_names,
   1569     output_names,
   1570     operator_export_type,
   1571     val_do_constant_folding,
   1572     fixed_batch_size=fixed_batch_size,
   1573     training=training,
   1574     dynamic_axes=dynamic_axes,
   1575 )
   1577 # TODO: Don't allocate a in-memory string for the protobuf
   1578 defer_weight_export = (
   1579     export_type is not _exporter_states.ExportTypes.PROTOBUF_FILE
   1580 )

File ~/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/onnx/utils.py:1117, in _model_to_graph(model, args, verbose, input_names, output_names, operator_export_type, do_constant_folding, _disable_torch_constant_prop, fixed_batch_size, training, dynamic_axes)
   1114 params_dict = _get_named_param_dict(graph, params)
   1116 try:
-> 1117     graph = _optimize_graph(
   1118         graph,
   1119         operator_export_type,
   1120         _disable_torch_constant_prop=_disable_torch_constant_prop,
   1121         fixed_batch_size=fixed_batch_size,
   1122         params_dict=params_dict,
   1123         dynamic_axes=dynamic_axes,
   1124         input_names=input_names,
   1125         module=module,
   1126     )
   1127 except Exception as e:
   1128     torch.onnx.log(\"Torch IR graph at exception: \", graph)

File ~/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/onnx/utils.py:639, in _optimize_graph(graph, operator_export_type, _disable_torch_constant_prop, fixed_batch_size, params_dict, dynamic_axes, input_names, module)
    636     _C._jit_pass_onnx_set_dynamic_input_shape(graph, dynamic_axes, input_names)
    637 _C._jit_pass_onnx_lint(graph)
--> 639 graph = _C._jit_pass_onnx(graph, operator_export_type)
    640 _C._jit_pass_onnx_lint(graph)
    641 _C._jit_pass_lint(graph)

File ~/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/onnx/utils.py:1836, in _run_symbolic_function(graph, block, node, inputs, env, values_in_env, new_nodes, operator_export_type)
   1831     if symbolic_fn is not None:
   1832         # TODO Wrap almost identical attrs assignment or comment the difference.
   1833         attrs = {
   1834             k: symbolic_helper._node_get(node, k) for k in node.attributeNames()
   1835         }
-> 1836         return symbolic_fn(graph_context, *inputs, **attrs)
   1838 attrs = {
   1839     k + \"_\" + node.kindOf(k)[0]: symbolic_helper._node_get(node, k)
   1840     for k in node.attributeNames()
   1841 }
   1842 if namespace == \"onnx\":
   1843     # Clone node to trigger ONNX shape inference

File ~/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/onnx/symbolic_helper.py:281, in parse_args.<locals>.decorator.<locals>.wrapper(g, *args, **kwargs)
    275 if len(kwargs) == 1:
    276     assert \"_outputs\" in kwargs, (
    277         f\"Symbolic function {fn.__name__}'s '**kwargs' can only contain \"
    278         f\"'_outputs' key at '**kwargs'. \"
    279         f\"{FILE_BUG_MSG}\"
    280     )
--> 281 return fn(g, *args, **kwargs)

File ~/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/onnx/symbolic_opset17.py:135, in stft(g, input, n_fft, hop_length, win_length, window, normalized, onesided, return_complex)
    133 # Checks
    134 if return_complex:
--> 135     raise errors.SymbolicValueError(
    136         msg=\"STFT does not currently support complex types\", value=input
    137     )
    139 # Get STFT sizes
    140 frame_step_value = hop_length if hop_length is not None else n_fft // 4

SymbolicValueError: STFT does not currently support complex types  [Caused by the value '97 defined in (%97 : Float(*, *, strides=[2946, 1], requires_grad=0, device=cpu) = onnx::Reshape[allowzero=0](%86, %96), scope: nemo.collections.asr.modules.audio_preprocessing.AudioToMelSpectrogramPreprocessor::/nemo.collections.asr.parts.preprocessing.features.FilterbankFeatures::featurizer # /home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/functional.py:703:0
)' (type 'Tensor') in the TorchScript graph. The containing node has kind 'onnx::Reshape'.] 
    (node defined in /home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/functional.py(703): stft
/home/ik/Documents/aakhor/asr/NeMo/nemo/collections/asr/parts/preprocessing/features.py(308): <lambda>
/home/ik/Documents/aakhor/asr/NeMo/nemo/collections/asr/parts/preprocessing/features.py(423): forward
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/utils/_contextlib.py(116): decorate_context
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/nn/modules/module.py(1726): _slow_forward
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/nn/modules/module.py(1747): _call_impl
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/nn/modules/module.py(1736): _wrapped_call_impl
/home/ik/Documents/aakhor/asr/NeMo/nemo/collections/asr/modules/audio_preprocessing.py(292): get_features
/home/ik/Documents/aakhor/asr/NeMo/nemo/collections/asr/modules/audio_preprocessing.py(91): forward
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/utils/_contextlib.py(116): decorate_context
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/nn/modules/module.py(1726): _slow_forward
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/nn/modules/module.py(1747): _call_impl
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/nn/modules/module.py(1736): _wrapped_call_impl
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/jit/_trace.py(130): wrapper
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/jit/_trace.py(139): forward
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/nn/modules/module.py(1747): _call_impl
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/nn/modules/module.py(1736): _wrapped_call_impl
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/jit/_trace.py(1500): _get_trace_graph
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/onnx/utils.py(904): _trace_and_get_graph_from_model
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/onnx/utils.py(997): _create_jit_graph
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/onnx/utils.py(1113): _model_to_graph
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/onnx/utils.py(1564): _export
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/onnx/utils.py(502): export
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/onnx/__init__.py(375): export
/home/ik/Documents/aakhor/asr/NeMo/nemo/core/classes/exportable.py(221): _export
/home/ik/Documents/aakhor/asr/NeMo/nemo/core/classes/exportable.py(114): export
/tmp/ipykernel_10033/3317768717.py(8): <module>
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/IPython/core/interactiveshell.py(3577): run_code
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/IPython/core/interactiveshell.py(3517): run_ast_nodes
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/IPython/core/interactiveshell.py(3334): run_cell_async
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/IPython/core/async_helpers.py(128): _pseudo_sync_runner
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/IPython/core/interactiveshell.py(3130): _run_cell
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/IPython/core/interactiveshell.py(3075): run_cell
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/ipykernel/zmqshell.py(549): run_cell
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/ipykernel/ipkernel.py(449): do_execute
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/ipykernel/kernelbase.py(778): execute_request
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/ipykernel/ipkernel.py(362): execute_request
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/ipykernel/kernelbase.py(437): dispatch_shell
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/ipykernel/kernelbase.py(534): process_one
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/ipykernel/kernelbase.py(545): dispatch_queue
/home/ik/miniconda3/envs/nemo/lib/python3.11/asyncio/events.py(84): _run
/home/ik/miniconda3/envs/nemo/lib/python3.11/asyncio/base_events.py(1936): _run_once
/home/ik/miniconda3/envs/nemo/lib/python3.11/asyncio/base_events.py(608): run_forever
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/tornado/platform/asyncio.py(205): start
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/ipykernel/kernelapp.py(739): start
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/traitlets/config/application.py(1075): launch_instance
/home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/ipykernel_launcher.py(18): <module>
<frozen runpy>(88): _run_code
<frozen runpy>(198): _run_module_as_main
)

    Inputs:
        #0: 86 defined in (%86 : Float(*, *, *, strides=[2946, 2946, 1], requires_grad=0, device=cpu) = onnx::Pad[mode=\"reflect\"](%59, %85), scope: nemo.collections.asr.modules.audio_preprocessing.AudioToMelSpectrogramPreprocessor::/nemo.collections.asr.parts.preprocessing.features.FilterbankFeatures::featurizer # /home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/nn/functional.py:5096:0
    )  (type 'Tensor')
        #1: 96 defined in (%96 : int[] = prim::ListConstruct(%90, %95), scope: nemo.collections.asr.modules.audio_preprocessing.AudioToMelSpectrogramPreprocessor::/nemo.collections.asr.parts.preprocessing.features.FilterbankFeatures::featurizer
    )  (type 'List[int]')
    Outputs:
        #0: 97 defined in (%97 : Float(*, *, strides=[2946, 1], requires_grad=0, device=cpu) = onnx::Reshape[allowzero=0](%86, %96), scope: nemo.collections.asr.modules.audio_preprocessing.AudioToMelSpectrogramPreprocessor::/nemo.collections.asr.parts.preprocessing.features.FilterbankFeatures::featurizer # /home/ik/miniconda3/envs/nemo/lib/python3.11/site-packages/torch/functional.py:703:0
    )  (type 'Tensor')"
}
```

**Expected behavior**

The preprocessor should export to onnx successfully.

**Environment overview (please complete the following information)**

 - Environment location: Local Ubuntu 22.04 
 - Method of NeMo install: from source using pip. Installed in editable mode.

**Environment details**

- OS version Ubuntu 22.04
- PyTorch version 2.5.1+cu124
- Python version 3.11.10

**Additional context**

The full model exports fine though. But that does not contain the preprocessor.


This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.