Skip to content

Instantly share code, notes, and snippets.

@SippieCup
Created April 21, 2020 19:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SippieCup/7594f6a0aa9aa672509fdf96989066a6 to your computer and use it in GitHub Desktop.
Save SippieCup/7594f6a0aa9aa672509fdf96989066a6 to your computer and use it in GitHub Desktop.
***********************************
* Keras2ONXX *
***********************************
Converting ../../models/supercombo.keras to ./supercombo.onnx
Cleaning intermediate data...
Converting OP Keras to Saved_Model...
2020-04-21 15:44:32.580200: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.0
WARNING:tensorflow:From /data/oprun/.virtualenvs/JetNanoOP/lib/python3.6/site-packages/tensorflow_core/python/ops/init_ops.py:97: calling VarianceScaling.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
WARNING:tensorflow:From /data/oprun/.virtualenvs/JetNanoOP/lib/python3.6/site-packages/tensorflow_core/python/ops/init_ops.py:97: calling Zeros.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
WARNING:tensorflow:From /data/oprun/.virtualenvs/JetNanoOP/lib/python3.6/site-packages/tensorflow_core/python/ops/init_ops.py:97: calling Ones.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
WARNING:tensorflow:From /data/oprun/.virtualenvs/JetNanoOP/lib/python3.6/site-packages/tensorflow_core/python/ops/resource_variable_ops.py:1630: calling BaseResourceVariable.__init__ (from tensorflow.python.ops.resource_variable_ops) with constraint is deprecated and will be removed in a future version.
Instructions for updating:
If using Keras pass *_constraint arguments to layers.
WARNING:tensorflow:From /data/oprun/.virtualenvs/JetNanoOP/lib/python3.6/site-packages/tensorflow_core/python/ops/init_ops.py:97: calling GlorotUniform.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
2020-04-21 15:44:50.487704: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1
2020-04-21 15:44:50.504825: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:950] ARM64 does not support NUMA - returning NUMA node zero
2020-04-21 15:44:50.505034: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties:
name: Xavier major: 7 minor: 2 memoryClockRate(GHz): 1.377
pciBusID: 0000:00:00.0
2020-04-21 15:44:50.505129: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.0
2020-04-21 15:44:50.535242: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10.0
2020-04-21 15:44:50.561435: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10.0
2020-04-21 15:44:50.596977: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10.0
2020-04-21 15:44:50.635299: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10.0
2020-04-21 15:44:50.656961: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10.0
2020-04-21 15:44:50.733597: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7
2020-04-21 15:44:50.733893: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:950] ARM64 does not support NUMA - returning NUMA node zero
2020-04-21 15:44:50.734155: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:950] ARM64 does not support NUMA - returning NUMA node zero
2020-04-21 15:44:50.734231: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0
2020-04-21 15:44:50.755902: W tensorflow/core/platform/profile_utils/cpu_utils.cc:98] Failed to find bogomips in /proc/cpuinfo; cannot determine CPU frequency
2020-04-21 15:44:50.757036: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x23b8cd60 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-04-21 15:44:50.757128: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
2020-04-21 15:44:50.868161: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:950] ARM64 does not support NUMA - returning NUMA node zero
2020-04-21 15:44:50.868499: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x254ce850 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:
2020-04-21 15:44:50.868553: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Xavier, Compute Capability 7.2
2020-04-21 15:44:50.869026: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:950] ARM64 does not support NUMA - returning NUMA node zero
2020-04-21 15:44:50.869120: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties:
name: Xavier major: 7 minor: 2 memoryClockRate(GHz): 1.377
pciBusID: 0000:00:00.0
2020-04-21 15:44:50.869175: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.0
2020-04-21 15:44:50.869218: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10.0
2020-04-21 15:44:50.869257: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10.0
2020-04-21 15:44:50.869294: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10.0
2020-04-21 15:44:50.869344: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10.0
2020-04-21 15:44:50.869470: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10.0
2020-04-21 15:44:50.869506: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7
2020-04-21 15:44:50.869645: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:950] ARM64 does not support NUMA - returning NUMA node zero
2020-04-21 15:44:50.869818: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:950] ARM64 does not support NUMA - returning NUMA node zero
2020-04-21 15:44:50.869883: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0
2020-04-21 15:44:50.869990: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.0
2020-04-21 15:44:53.069455: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-04-21 15:44:53.069626: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0
2020-04-21 15:44:53.069693: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N
2020-04-21 15:44:53.070286: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:950] ARM64 does not support NUMA - returning NUMA node zero
2020-04-21 15:44:53.070540: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:950] ARM64 does not support NUMA - returning NUMA node zero
2020-04-21 15:44:53.070697: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 25472 MB memory) -> physical GPU (device: 0, name: Xavier, pci bus id: 0000:00:00.0, compute capability: 7.2)
WARNING:tensorflow:From /data/openpilot/tools/keras/save_interm.py:27: The name tf.keras.backend.get_session is deprecated. Please use tf.compat.v1.keras.backend.get_session instead.
Model: "model"
__________________________________________________________________________________________________
Layer (type) Output Shape Param # Connected to
==================================================================================================
input_1 (InputLayer) [(None, 394250)] 0
__________________________________________________________________________________________________
lambda (Lambda) (None, 393216) 0 input_1[0][0]
__________________________________________________________________________________________________
lambda_1 (Lambda) (None, 8) 0 input_1[0][0]
__________________________________________________________________________________________________
lambda_2 (Lambda) (None, 2) 0 input_1[0][0]
__________________________________________________________________________________________________
lambda_3 (Lambda) (None, 1024) 0 input_1[0][0]
__________________________________________________________________________________________________
reshape (Reshape) (None, 12, 128, 256) 0 lambda[0][0]
__________________________________________________________________________________________________
reshape_1 (Reshape) (None, 8) 0 lambda_1[0][0]
__________________________________________________________________________________________________
reshape_2 (Reshape) (None, 2) 0 lambda_2[0][0]
__________________________________________________________________________________________________
reshape_3 (Reshape) (None, 1024) 0 lambda_3[0][0]
__________________________________________________________________________________________________
model (Model) [(None, 385), (None, 19638205 reshape[0][0]
reshape_1[0][0]
reshape_2[0][0]
reshape_3[0][0]
__________________________________________________________________________________________________
concatenate (Concatenate) (None, 2895) 0 model[1][0]
model[1][1]
model[1][2]
model[1][3]
model[1][4]
model[1][5]
model[1][6]
model[1][7]
model[1][8]
model[1][9]
model[1][10]
model[1][11]
==================================================================================================
Total params: 19,638,205
Trainable params: 19,570,573
Non-trainable params: 67,632
__________________________________________________________________________________________________
2020-04-21 15:45:10.789542: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:950] ARM64 does not support NUMA - returning NUMA node zero
2020-04-21 15:45:10.789758: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties:
name: Xavier major: 7 minor: 2 memoryClockRate(GHz): 1.377
pciBusID: 0000:00:00.0
2020-04-21 15:45:10.789829: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.0
2020-04-21 15:45:10.789874: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10.0
2020-04-21 15:45:10.789959: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10.0
2020-04-21 15:45:10.790029: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10.0
2020-04-21 15:45:10.790076: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10.0
2020-04-21 15:45:10.790141: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10.0
2020-04-21 15:45:10.790230: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7
2020-04-21 15:45:10.790397: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:950] ARM64 does not support NUMA - returning NUMA node zero
2020-04-21 15:45:10.790602: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:950] ARM64 does not support NUMA - returning NUMA node zero
2020-04-21 15:45:10.790683: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0
2020-04-21 15:45:10.790744: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-04-21 15:45:10.790768: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0
2020-04-21 15:45:10.790796: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N
2020-04-21 15:45:10.790929: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:950] ARM64 does not support NUMA - returning NUMA node zero
2020-04-21 15:45:10.791095: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:950] ARM64 does not support NUMA - returning NUMA node zero
2020-04-21 15:45:10.791179: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 25472 MB memory) -> physical GPU (device: 0, name: Xavier, pci bus id: 0000:00:00.0, compute capability: 7.2)
2020-04-21 15:46:10.555624: W tensorflow/python/util/util.cc:299] Sets are not currently considered sequences, but this may change in the future, so consider avoiding using them.
Converting Saved_Model to ONXX
2020-04-21 15:48:45.911909: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.0
WARNING:tensorflow:From /data/oprun/.virtualenvs/JetNanoOP/lib/python3.6/site-packages/tf2onnx/verbose_logging.py:72: The name tf.logging.set_verbosity is deprecated. Please use tf.compat.v1.logging.set_verbosity instead.
2020-04-21 15:48:50,817 - WARNING - From /data/oprun/.virtualenvs/JetNanoOP/lib/python3.6/site-packages/tf2onnx/verbose_logging.py:72: The name tf.logging.set_verbosity is deprecated. Please use tf.compat.v1.logging.set_verbosity instead.
2020-04-21 15:48:52.416201: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1
2020-04-21 15:48:52.420800: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:950] ARM64 does not support NUMA - returning NUMA node zero
2020-04-21 15:48:52.420975: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties:
name: Xavier major: 7 minor: 2 memoryClockRate(GHz): 1.377
pciBusID: 0000:00:00.0
2020-04-21 15:48:52.421038: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.0
2020-04-21 15:48:52.423421: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10.0
2020-04-21 15:48:52.425572: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10.0
2020-04-21 15:48:52.426464: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10.0
2020-04-21 15:48:52.429392: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10.0
2020-04-21 15:48:52.431726: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10.0
2020-04-21 15:48:52.438856: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7
2020-04-21 15:48:52.439226: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:950] ARM64 does not support NUMA - returning NUMA node zero
2020-04-21 15:48:52.439511: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:950] ARM64 does not support NUMA - returning NUMA node zero
2020-04-21 15:48:52.439594: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0
2020-04-21 15:48:52.458259: W tensorflow/core/platform/profile_utils/cpu_utils.cc:98] Failed to find bogomips in /proc/cpuinfo; cannot determine CPU frequency
2020-04-21 15:48:52.459234: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x390916a0 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-04-21 15:48:52.459306: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
2020-04-21 15:48:52.528567: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:950] ARM64 does not support NUMA - returning NUMA node zero
2020-04-21 15:48:52.529001: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x39350650 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:
2020-04-21 15:48:52.529098: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Xavier, Compute Capability 7.2
2020-04-21 15:48:52.529671: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:950] ARM64 does not support NUMA - returning NUMA node zero
2020-04-21 15:48:52.529787: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties:
name: Xavier major: 7 minor: 2 memoryClockRate(GHz): 1.377
pciBusID: 0000:00:00.0
2020-04-21 15:48:52.529930: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.0
2020-04-21 15:48:52.530007: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10.0
2020-04-21 15:48:52.530053: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10.0
2020-04-21 15:48:52.530117: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10.0
2020-04-21 15:48:52.530206: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10.0
2020-04-21 15:48:52.530272: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10.0
2020-04-21 15:48:52.530358: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7
2020-04-21 15:48:52.530533: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:950] ARM64 does not support NUMA - returning NUMA node zero
2020-04-21 15:48:52.530746: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:950] ARM64 does not support NUMA - returning NUMA node zero
2020-04-21 15:48:52.530813: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0
2020-04-21 15:48:52.530906: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.0
2020-04-21 15:48:53.276707: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-04-21 15:48:53.276832: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0
2020-04-21 15:48:53.276868: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N
2020-04-21 15:48:53.277326: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:950] ARM64 does not support NUMA - returning NUMA node zero
2020-04-21 15:48:53.277626: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:950] ARM64 does not support NUMA - returning NUMA node zero
2020-04-21 15:48:53.277863: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 24198 MB memory) -> physical GPU (device: 0, name: Xavier, pci bus id: 0000:00:00.0, compute capability: 7.2)
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/data/oprun/.virtualenvs/JetNanoOP/lib/python3.6/site-packages/tf2onnx/convert.py", line 161, in <module>
main()
File "/data/oprun/.virtualenvs/JetNanoOP/lib/python3.6/site-packages/tf2onnx/convert.py", line 123, in main
args.saved_model, args.inputs, args.outputs, args.signature_def)
File "/data/oprun/.virtualenvs/JetNanoOP/lib/python3.6/site-packages/tf2onnx/loader.py", line 104, in from_saved_model
meta_graph_def = tf.saved_model.loader.load(sess, [tf.saved_model.tag_constants.SERVING], model_path)
File "/data/oprun/.virtualenvs/JetNanoOP/lib/python3.6/site-packages/tensorflow_core/python/util/deprecation.py", line 324, in new_func
return func(*args, **kwargs)
File "/data/oprun/.virtualenvs/JetNanoOP/lib/python3.6/site-packages/tensorflow_core/python/saved_model/loader_impl.py", line 268, in load
loader = SavedModelLoader(export_dir)
File "/data/oprun/.virtualenvs/JetNanoOP/lib/python3.6/site-packages/tensorflow_core/python/saved_model/loader_impl.py", line 284, in __init__
self._saved_model = parse_saved_model(export_dir)
File "/data/oprun/.virtualenvs/JetNanoOP/lib/python3.6/site-packages/tensorflow_core/python/saved_model/loader_impl.py", line 83, in parse_saved_model
constants.SAVED_MODEL_FILENAME_PB))
OSError: SavedModel file does not exist at: /data/intermediate/{saved_model.pbtxt|saved_model.pb}
Cleaning up...
Conversion completed!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment