--- ./build/Linux/RelWithDebInfo/_deps/onnx-src/onnx/helper.py.orig	2023-05-23 05:20:01.951435370 -0500
+++ ./build/Linux/RelWithDebInfo/_deps/onnx-src/onnx/helper.py	2023-05-23 05:34:14.221071294 -0500
@@ -3,6 +3,7 @@
 import collections.abc
 import numbers
 import struct
+import sys
 from cmath import isnan
 from typing import (
     Any,
@@ -387,7 +388,14 @@
         )
 
     if raw:
-        tensor.raw_data = vals
+        if isinstance(vals, bytes):
+            if sys.byteorder == 'big':
+                vals_ndarray = np.frombuffer(vals, np_dtype, count=-1, offset=0)
+                if type(vals_ndarray) is np.ndarray:
+                    raw_data_le_temp = vals_ndarray.byteswap(inplace=False)
+                    tensor.raw_data = raw_data_le_temp.tobytes()
+        else:
+            tensor.raw_data = vals
     else:
         if data_type == TensorProto.COMPLEX64 or data_type == TensorProto.COMPLEX128:
             vals = split_complex_to_pairs(vals)
