Facing error while using onnx from scatterelements
Labels: module: onnx, triaged

### 🐛 Describe the bug

I am trying to convert a pytorch model (Conv-TasNet) to onnx and then to tflite link- https://github.com/kaituoxu/Conv-TasNet

Script to convert torch model to onnx
```
import onnx
import torch

from conv_tasnet import ConvTasNet


def convertoOnnx():
    device = torch.device('cpu')
    # Create model.
    model = ConvTasNet(256, 20, 256, 512, 3, 8, 4,
                       2, norm_type="gLN", causal=0,
                       mask_nonlinear="relu")

    model.to(device)
    dummy_input =  {'mixtures': torch.ones(256, 20).to(torch.device('cpu'))}

    onnx_model_path = 'conv_tasnet.onnx'
    torch.onnx.export(model, dummy_input["mixtures"], onnx_model_path, verbose=True, opset_version=12)
def main():
    convertoOnnx()

if __name__ == "__main__":

    main()
```

onnx model link - https://drive.google.com/file/d/189UHTs9OvDiNBc6BiZDG5zde2zSyTe6E/view?usp=sharing

When i tried to convert onnx to tflite model facing issue 

```
tensorflow.python.framework.errors_impl.InvalidArgumentError: {{function_node __wrapped__ConcatV2_N_4_device_/job:localhost/replica:0/task:0/device:CPU:0}} ConcatOp : Ranks of all input tensors should match: shape[0] = [256,2,2,10,1] vs. shape[2] = [2,1,256,2,2,10,1] [Op:ConcatV2] name: concat

ERROR: input_onnx_file_path: conv_tasnet.onnx
ERROR: onnx_op_name: /decoder/ScatterElements
```
The author of the repo onnx2tf says that it a bug from pytorch . Could you kindly resolve it 

Additionally even if we inference  with standard onnxruntime we face below error

```
sit4onnx -if conv_tasnet.onnx -oep cpu

INFO: file: conv_tasnet.onnx
INFO: providers: ['CPUExecutionProvider']
INFO: input_name.1: onnx::Unsqueeze_0 shape: [256, 20] dtype: float32
Traceback (most recent call last):
  File "/home/b920405/.local/bin/sit4onnx", line 8, in <module>
    sys.exit(main())
  File "/home/b920405/.local/lib/python3.10/site-packages/sit4onnx/onnx_inference_test.py", line 506, in main
    final_results = inference(
  File "/home/b920405/.local/lib/python3.10/site-packages/sit4onnx/onnx_inference_test.py", line 357, in inference
    results = onnx_session.run(
  File "/home/b920405/.local/lib/python3.10/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 217, in run
    return self._sess.run(output_names, input_feed, run_options)
onnxruntime.capi.onnxruntime_pybind11_state.InvalidArgument: [ONNXRuntimeError] : 2 :

INVALID_ARGUMENT : Non-zero status code returned while running ScatterElementsnode.
Name: '/decoder/ScatterElements'
Status Message: Indices and updates must have the same rank
```
This is the issue where the author of onnx2tf told that its a bug from pytorch https://github.com/PINTO0309/onnx2tf/issues/447



### Versions

I tested it in both environments env1 and env2

pytorch env 1

[pip3] numpy==1.21.6
[pip3] torch==1.13.1
[pip3] torchprofile==0.0.2
[pip3] torchscan==0.1.1
[pip3] torchstat==0.0.7
[pip3] torchsummary==1.5.1
[pip3] torchvision==0.6.1
[conda] numpy                     1.21.6                   pypi_0    pypi
[conda] torch                     1.13.1                   pypi_0    pypi


pytorch env 2
Versions of relevant libraries:
[pip3] numpy==1.24.3
[pip3] pytorch-lightning==2.0.6
[pip3] torch==2.0.1
[pip3] torchlibrosa==0.0.9
[pip3] torchmetrics==1.0.1
[pip3] torchvision==0.15.2
[pip3] triton==2.0.0
[conda] numpy                     1.24.3                   pypi_0    pypi
[conda] pytorch-lightning         2.0.6                    pypi_0    pypi
[conda] torch                     2.0.1                    pypi_0    pypi
[conda] torchlibrosa              0.0.9                    pypi_0    pypi
[conda] torchmetrics              1.0.1                    pypi_0    pypi
[conda] torchvision               0.15.2                   pypi_0    pypi
[conda] triton                    2.0.0                    pypi_0    pypi