UserWarning: ONNX export unsqueeze with negative axis -1 might cause the onnx model to be incorrect. Negative axis is not supported in ONNX.

UserWarning: ONNX export unsqueeze with negative axis -1 might cause the onnx model to be incorrect. Negative axis is not supported in ONNX. Axis is converted to 1 based on input shape at export time. Passing an tensor of different rank in execution will be incorrect.
“Passing an tensor of different rank in execution will be incorrect.”)

I encountered this issue when exporting the pytorch model as an onnx model. It seems that the unsqueeze (-1) operation is not supported in onnx. After my tracking, it seems that the unsqueeze (-1) operation is in the function scatter_add_. But due to the absence of the function scatter_ add_, I don’t know how to modify the Python code. What should I do.