PINTO0309 / openvino2tensorflow

This script converts the ONNX/OpenVINO IR model to Tensorflow's saved_model, tflite, h5, tfjs, tftrt(TensorRT), CoreML, EdgeTPU, ONNX and pb. PyTorch (NCHW) -> ONNX (NCHW) -> OpenVINO (NCHW) -> openvino2tensorflow -> Tensorflow/Keras (NHWC/NCHW) -> TFLite (NHWC/NCHW). And the conversion from .pb to saved_model and from saved_model to .pb and from .pb to .tflite and saved_model to .tflite and saved_model to onnx. Support for building environments with Docker. It is possible to directly access the host PC GUI and the camera to verify the operation. NVIDIA GPU (dGPU) support. Intel iHD GPU (iGPU) support.
MIT License
334 stars 40 forks source link

[error] Eager execution of tf.constant with unsupported shape #101

Closed Dlmu-LCC closed 2 years ago

Dlmu-LCC commented 2 years ago

Issue Type

Others

OS

Windows

OS architecture

x86_64

Programming Language

Python

Framework

OpenVINO, TensorFlow, TensorFlowLite

Download URL for ONNX / OpenVINO IR

light_head_pose_onnx.zip light_head_pose_openvino.zip

Convert Script

python E:/Desk/openvino2tensorflow-1.29.5/openvino2tensorflow/openvino2tensorflow.py --model_path D:/light_head_pose.xml --model_output_path D:/tflite --output_no_quant_float32_tflitelight_head_pose

Description

After I got this error log, I try to follow the 6-7 in the README.But this is the first time I use openvino2tensorflow,I don't have much experience in solving this problem.And I try to find the same model from model zoo.Unfortunatly,the model zoo doesn't have this model.This is the source code link for this model:https://github.com/Shaw-git/Lightweight-Head-Pose-Estimation

Relevant Log Output

Log
```shell (openvino) E:\lite-tool\openvino_2021.4.582\bin>python E:/Desk/openvino2tensorflow-1.29.5/openvino2tensorflow/openvino2tensorflow.py --model_path D:/tflite/light_head_pose.xml --model_output_path D:/tflite --output_no_quant_float32_tflite 2022-04-26 16:44:53.827936: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cudart64_110.dll TensorFlow/Keras model building process starts ====================================== Layer structure ===================================================================== layer_type: Input layer_id: 0 tf_layers_dict: KerasTensor(type_spec=TensorSpec(shape=(1, 224, 224, 3), dtype=tf.float32, name='input'), name='input', description="created by layer 'input'") ==================================================================================== layer_type: Const layer_id: 1 tf_layers_dict_shape: (16, 3, 3, 3) tf_layers_dict_value: [[[[-1.28747150e-01 -1.79778248e-01 -1.87690750e-01] [-1.81370229e-01 -2.24691197e-01 -7.11100549e-02] [ 5.43487165e-03 -1.55331627e-01 -2.79038828e-02]] [[ 1.70179948e-01 2.06866816e-01 2.18064368e-01] [ 2.43742153e-01 1.72565579e-01 1.83622167e-01] [ 1.70595631e-01 2.17485026e-01 1.60763070e-01]] [[ 7.52735138e-02 -5.85605502e-02 -2.00096215e-03] [-3.50489505e-02 3.34885269e-02 3.20423365e-04] [-3.40099446e-02 -6.10364452e-02 -1.52224973e-01]]] [[[-1.36320636e-01 -1.67207584e-01 -1.07728586e-01] [-1.22013189e-01 -1.51277915e-01 -4.40817475e-02] [-2.10978851e-01 -1.48651049e-01 -3.88675369e-02]] [[ 1.14311501e-01 9.20454115e-02 6.24174289e-02] [ 7.75540993e-02 4.42218892e-02 1.44786328e-01] [ 6.85275793e-02 7.61931762e-02 1.51274413e-01]] [[ 2.46647820e-02 -5.40999621e-02 -6.30642697e-02] [ 2.25816742e-02 4.65028957e-02 -1.23553211e-02] [-5.12099676e-02 -7.71066919e-02 -5.11256559e-03]]] [[[ 1.81233346e-01 1.98712274e-01 4.69815172e-02] [ 1.37449965e-01 1.22061670e-01 7.35906661e-02] [ 1.64439648e-01 7.76147246e-02 7.49363750e-02]] [[-1.33596390e-01 -6.66654706e-02 -1.00376137e-01] [-6.14763647e-02 -9.67425555e-02 -8.39873180e-02] [-1.66738138e-01 -9.71747711e-02 -1.49526313e-01]] [[-2.98264399e-02 1.63798425e-02 -1.46990055e-02] [ 1.21713892e-01 -2.51148790e-02 1.22141615e-02] [ 1.52740017e-01 1.48366112e-02 1.50693178e-01]]] [[[ 4.30048965e-02 2.36362629e-02 -2.61549689e-02] [-4.86083701e-02 -1.36116430e-01 -2.41583839e-01] [ 2.29078941e-02 2.60728388e-03 -4.87001538e-02]] [[ 7.54323527e-02 1.63607690e-02 -5.40516526e-02] [-5.47976121e-02 -1.35384515e-01 -1.98946312e-01] [ 6.23108707e-02 2.23674793e-02 1.89474504e-03]] [[ 2.60076709e-02 8.87992699e-03 5.72559191e-03] [-5.46668954e-02 -6.74684495e-02 -1.60331324e-01] [-7.63600576e-04 -3.76588991e-03 2.45746225e-02]]] [[[ 4.03045379e-02 4.43353839e-02 4.44512852e-02] [ 3.01445611e-02 4.12219651e-02 3.87447551e-02] [ 2.52422001e-02 3.54552381e-02 3.81103978e-02]] [[-1.14546893e-02 1.88537333e-02 1.94186438e-02] [-2.67775152e-02 2.42400821e-03 8.85657687e-03] [-3.45621817e-02 -1.38242282e-02 2.92249676e-02]] [[ 1.11913858e-02 2.81512048e-02 2.67681535e-02] [-2.97377934e-03 3.09829619e-02 3.37624066e-02] [-1.92176143e-03 2.71749846e-03 3.78932133e-02]]] [[[ 3.71080115e-02 1.71357706e-01 1.21181503e-01] [-1.88742146e-01 3.54197733e-02 9.14414227e-02] [-2.39831418e-01 -2.47864202e-01 -7.37123948e-04]] [[ 3.51550765e-02 2.02050969e-01 1.95344746e-01] [-2.73537248e-01 -1.39134051e-02 1.89775065e-01] [-2.57146448e-01 -1.81950122e-01 1.06003046e-01]] [[-4.27778624e-02 1.82434365e-01 1.56811059e-01] [-1.52297780e-01 2.04871409e-02 1.33456841e-01] [-1.09270617e-01 -2.72415876e-01 5.74372783e-02]]] [[[ 4.33606990e-02 1.05885692e-01 3.83133218e-02] [ 3.67755033e-02 1.09290026e-01 9.25927088e-02] [ 5.07854391e-03 7.29644895e-02 8.41502547e-02]] [[-5.71533069e-02 9.49448068e-03 1.61378123e-02] [-4.26099114e-02 -1.31590366e-02 6.01572392e-04] [-5.03813177e-02 -3.48532684e-02 4.82697738e-03]] [[-2.99337786e-02 2.13847235e-02 5.03260829e-02] [-3.44969295e-02 -1.79638565e-02 6.57583307e-03] [-4.91834059e-02 -6.22534426e-04 2.47594733e-02]]] [[[-7.67406449e-02 -9.81493294e-02 -3.59135643e-02] [-1.30107716e-01 -5.34366928e-02 9.42651704e-02] [-4.53546084e-02 -2.43719295e-02 4.66528460e-02]] [[-1.48435235e-01 -5.48934191e-02 6.12657703e-03] [-1.62395030e-01 -3.33649889e-02 9.66478437e-02] [-4.19244319e-02 -5.47898235e-03 1.02174774e-01]] [[-1.07965730e-01 -3.29639902e-03 2.80103199e-02] [-1.04351513e-01 -1.47217382e-02 1.29063427e-01] [-1.01593666e-01 2.84857349e-04 7.72118121e-02]]] [[[-2.88470596e-01 -2.50198513e-01 -3.08140018e-03] [-1.17348239e-01 -2.32543126e-02 9.76700038e-02] [-2.25045756e-02 1.33933619e-01 1.32455036e-01]] [[-3.73067617e-01 -3.27504516e-01 -1.05475903e-01] [-1.50587067e-01 -1.61686614e-01 -8.88413712e-02] [-9.21801664e-03 1.13199867e-01 -1.36139384e-02]] [[-3.24048288e-02 -2.00075004e-02 1.06272645e-01] [-1.03328023e-02 8.75283927e-02 1.82657018e-01] [ 1.54394969e-01 1.59294546e-01 1.09638453e-01]]] [[[ 5.52593529e-01 2.43644997e-01 2.17595443e-01] [ 2.53885925e-01 6.39485046e-02 -3.26147020e-01] [-2.37111494e-01 -3.16664785e-01 -4.29414093e-01]] [[ 3.39498818e-01 4.34197426e-01 2.61163324e-01] [ 2.96125591e-01 6.30766749e-02 -1.48551971e-01] [-2.04828635e-01 -2.68663287e-01 -4.68664706e-01]] [[ 5.20952791e-02 1.26757517e-01 5.13066724e-02] [-1.54216304e-01 1.27303347e-01 5.10577112e-03] [-1.38535742e-02 -2.35472292e-01 -1.14686549e-01]]] [[[-7.84049332e-02 -1.86174475e-02 9.53090116e-02] [-1.22842804e-01 1.02609396e-02 1.38994798e-01] [-1.11310884e-01 1.25922695e-01 1.80290490e-01]] [[-2.50101537e-01 -1.97451964e-01 8.43051374e-02] [-1.63394257e-01 -2.45421641e-02 1.22322232e-01] [-1.10611863e-01 4.00208170e-03 1.78452820e-01]] [[-2.30570249e-02 2.43468732e-02 1.93510681e-01] [-2.06400350e-01 1.15230940e-02 1.03151456e-01] [-4.69967425e-02 7.59930611e-02 1.51867568e-01]]] [[[-1.27221523e-02 -2.49238382e-03 8.36617500e-03] [-2.77287569e-02 -1.16607756e-04 4.07919614e-03] [-3.01736947e-02 -2.04785429e-02 -6.26348192e-03]] [[-2.72265635e-02 -2.79248245e-02 -1.03645949e-02] [-2.41047163e-02 -2.36889794e-02 8.06364405e-04] [-2.32501943e-02 -2.00510267e-02 1.51562865e-03]] [[-1.39369285e-02 -3.17132473e-02 -2.68528759e-02] [-4.25120536e-03 -1.49036171e-02 -5.95835445e-04] [-8.87892675e-03 -1.64482612e-02 -9.38815624e-03]]] [[[-4.38917428e-02 -1.16293728e-01 -6.84261695e-02] [-5.74721433e-02 -1.22569449e-01 -1.52162313e-01] [ 4.98240534e-03 -9.59625691e-02 -1.12204500e-01]] [[-5.38447127e-02 -3.84530537e-02 -4.63660248e-03] [ 1.17157241e-02 -2.55785119e-02 -5.73641574e-03] [ 5.00605404e-02 -1.47240134e-02 1.13022039e-02]] [[-1.91540942e-02 -6.54362887e-02 -3.04396916e-02] [ 6.21595141e-03 3.01347412e-02 4.39182222e-02] [ 5.25878482e-02 4.91308905e-02 6.98990375e-02]]] [[[-1.46309496e-03 9.12385527e-03 3.08206994e-02] [-3.80585110e-03 -3.81508656e-03 5.03432751e-02] [ 4.08498049e-02 8.80996808e-02 1.22935139e-01]] [[ 4.81613800e-02 2.29146238e-02 -2.82667782e-02] [ 5.70256598e-02 2.83022281e-02 5.52848391e-02] [ 1.76027212e-02 1.01964451e-01 1.37629166e-01]] [[ 2.45439596e-02 2.76081171e-02 -1.07265357e-02] [-4.66378368e-02 -3.42933573e-02 8.83975066e-03] [-2.82661021e-02 1.89348906e-02 3.23766395e-02]]] [[[ 8.99920389e-02 8.63246694e-02 6.21820502e-02] [ 3.41172814e-02 7.88429007e-02 1.03779905e-01] [-1.54874742e-03 1.16031416e-01 1.50894240e-01]] [[ 2.75607873e-03 6.26871875e-03 -6.02213778e-02] [ 1.06142079e-02 3.46064009e-02 1.08221779e-02] [-3.92941907e-02 2.33856682e-02 3.66214588e-02]] [[ 5.52414171e-02 2.33600419e-02 -5.42076584e-03] [-2.04358455e-02 -1.54962298e-02 -4.60756309e-02] [-3.78624722e-02 1.89115852e-03 -2.70520337e-03]]] [[[ 5.87712526e-02 2.51914654e-02 1.08421080e-01] [ 2.93965265e-02 -1.00023329e-01 -9.71960500e-02] [ 4.13462631e-02 -2.34382153e-01 -3.49721938e-01]] [[-2.76685078e-02 -1.84212215e-02 -1.77112464e-02] [-3.39081511e-02 -9.86262411e-02 -6.23201057e-02] [ 5.05372621e-02 -7.04121441e-02 -2.22428873e-01]] [[-3.32143828e-02 -3.94973978e-02 -1.12504710e-03] [-5.96313330e-04 -2.14654822e-02 -5.74261532e-04] [ 5.40604107e-02 2.79192929e-03 5.05764484e-02]]]] ==================================================================================== 2022-04-26 16:44:56.482527: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library nvcuda.dll 2022-04-26 16:44:57.530572: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1733] Found device 0 with properties: pciBusID: 0000:01:00.0 name: NVIDIA GeForce GTX 1660 Ti computeCapability: 7.5 coreClock: 1.59GHz coreCount: 24 deviceMemorySize: 6.00GiB deviceMemoryBandwidth: 268.26GiB/s 2022-04-26 16:44:57.540948: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cudart64_110.dll 2022-04-26 16:44:57.567025: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cublas64_11.dll 2022-04-26 16:44:57.594045: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cublasLt64_11.dll 2022-04-26 16:44:57.617432: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cufft64_10.dll 2022-04-26 16:44:57.630348: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library curand64_10.dll 2022-04-26 16:44:57.638314: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cusolver64_11.dll'; dlerror: cusolver64_11.dll not found 2022-04-26 16:44:57.646792: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cusparse64_11.dll 2022-04-26 16:44:57.653398: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cudnn64_8.dll 2022-04-26 16:44:57.658858: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1766] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform. Skipping registering GPU devices... 2022-04-26 16:44:57.671566: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX AVX2 To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. 2022-04-26 16:44:57.689698: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1258] Device interconnect StreamExecutor with strength 1 edge matrix: 2022-04-26 16:44:57.693991: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1264] layer_type: Convolution layer_id: 2 input_layer0: layer_id=0: KerasTensor(type_spec=TensorSpec(shape=(1, 224, 224, 3), dtype=tf.float32, name='input'), name='input', description="created by layer 'input'") input_layer1_value: layer_id=1: [[[[-1.28747150e-01 -1.79778248e-01 -1.87690750e-01] [-1.81370229e-01 -2.24691197e-01 -7.11100549e-02] [ 5.43487165e-03 -1.55331627e-01 -2.79038828e-02]] [[ 1.70179948e-01 2.06866816e-01 2.18064368e-01] [ 2.43742153e-01 1.72565579e-01 1.83622167e-01] [ 1.70595631e-01 2.17485026e-01 1.60763070e-01]] [[ 7.52735138e-02 -5.85605502e-02 -2.00096215e-03] [-3.50489505e-02 3.34885269e-02 3.20423365e-04] [-3.40099446e-02 -6.10364452e-02 -1.52224973e-01]]] [[[-1.36320636e-01 -1.67207584e-01 -1.07728586e-01] [-1.22013189e-01 -1.51277915e-01 -4.40817475e-02] [-2.10978851e-01 -1.48651049e-01 -3.88675369e-02]] [[ 1.14311501e-01 9.20454115e-02 6.24174289e-02] [ 7.75540993e-02 4.42218892e-02 1.44786328e-01] [ 6.85275793e-02 7.61931762e-02 1.51274413e-01]] [[ 2.46647820e-02 -5.40999621e-02 -6.30642697e-02] [ 2.25816742e-02 4.65028957e-02 -1.23553211e-02] [-5.12099676e-02 -7.71066919e-02 -5.11256559e-03]]] [[[ 1.81233346e-01 1.98712274e-01 4.69815172e-02] [ 1.37449965e-01 1.22061670e-01 7.35906661e-02] [ 1.64439648e-01 7.76147246e-02 7.49363750e-02]] [[-1.33596390e-01 -6.66654706e-02 -1.00376137e-01] [-6.14763647e-02 -9.67425555e-02 -8.39873180e-02] [-1.66738138e-01 -9.71747711e-02 -1.49526313e-01]] [[-2.98264399e-02 1.63798425e-02 -1.46990055e-02] [ 1.21713892e-01 -2.51148790e-02 1.22141615e-02] [ 1.52740017e-01 1.48366112e-02 1.50693178e-01]]] [[[ 4.30048965e-02 2.36362629e-02 -2.61549689e-02] [-4.86083701e-02 -1.36116430e-01 -2.41583839e-01] [ 2.29078941e-02 2.60728388e-03 -4.87001538e-02]] [[ 7.54323527e-02 1.63607690e-02 -5.40516526e-02] [-5.47976121e-02 -1.35384515e-01 -1.98946312e-01] [ 6.23108707e-02 2.23674793e-02 1.89474504e-03]] [[ 2.60076709e-02 8.87992699e-03 5.72559191e-03] [-5.46668954e-02 -6.74684495e-02 -1.60331324e-01] [-7.63600576e-04 -3.76588991e-03 2.45746225e-02]]] [[[ 4.03045379e-02 4.43353839e-02 4.44512852e-02] [ 3.01445611e-02 4.12219651e-02 3.87447551e-02] [ 2.52422001e-02 3.54552381e-02 3.81103978e-02]] [[-1.14546893e-02 1.88537333e-02 1.94186438e-02] [-2.67775152e-02 2.42400821e-03 8.85657687e-03] [-3.45621817e-02 -1.38242282e-02 2.92249676e-02]] [[ 1.11913858e-02 2.81512048e-02 2.67681535e-02] [-2.97377934e-03 3.09829619e-02 3.37624066e-02] [-1.92176143e-03 2.71749846e-03 3.78932133e-02]]] [[[ 3.71080115e-02 1.71357706e-01 1.21181503e-01] [-1.88742146e-01 3.54197733e-02 9.14414227e-02] [-2.39831418e-01 -2.47864202e-01 -7.37123948e-04]] [[ 3.51550765e-02 2.02050969e-01 1.95344746e-01] [-2.73537248e-01 -1.39134051e-02 1.89775065e-01] [-2.57146448e-01 -1.81950122e-01 1.06003046e-01]] [[-4.27778624e-02 1.82434365e-01 1.56811059e-01] [-1.52297780e-01 2.04871409e-02 1.33456841e-01] [-1.09270617e-01 -2.72415876e-01 5.74372783e-02]]] [[[ 4.33606990e-02 1.05885692e-01 3.83133218e-02] [ 3.67755033e-02 1.09290026e-01 9.25927088e-02] [ 5.07854391e-03 7.29644895e-02 8.41502547e-02]] [[-5.71533069e-02 9.49448068e-03 1.61378123e-02] [-4.26099114e-02 -1.31590366e-02 6.01572392e-04] [-5.03813177e-02 -3.48532684e-02 4.82697738e-03]] [[-2.99337786e-02 2.13847235e-02 5.03260829e-02] [-3.44969295e-02 -1.79638565e-02 6.57583307e-03] [-4.91834059e-02 -6.22534426e-04 2.47594733e-02]]] [[[-7.67406449e-02 -9.81493294e-02 -3.59135643e-02] [-1.30107716e-01 -5.34366928e-02 9.42651704e-02] [-4.53546084e-02 -2.43719295e-02 4.66528460e-02]] [[-1.48435235e-01 -5.48934191e-02 6.12657703e-03] [-1.62395030e-01 -3.33649889e-02 9.66478437e-02] [-4.19244319e-02 -5.47898235e-03 1.02174774e-01]] [[-1.07965730e-01 -3.29639902e-03 2.80103199e-02] [-1.04351513e-01 -1.47217382e-02 1.29063427e-01] [-1.01593666e-01 2.84857349e-04 7.72118121e-02]]] [[[-2.88470596e-01 -2.50198513e-01 -3.08140018e-03] [-1.17348239e-01 -2.32543126e-02 9.76700038e-02] [-2.25045756e-02 1.33933619e-01 1.32455036e-01]] [[-3.73067617e-01 -3.27504516e-01 -1.05475903e-01] [-1.50587067e-01 -1.61686614e-01 -8.88413712e-02] [-9.21801664e-03 1.13199867e-01 -1.36139384e-02]] [[-3.24048288e-02 -2.00075004e-02 1.06272645e-01] [-1.03328023e-02 8.75283927e-02 1.82657018e-01] [ 1.54394969e-01 1.59294546e-01 1.09638453e-01]]] [[[ 5.52593529e-01 2.43644997e-01 2.17595443e-01] [ 2.53885925e-01 6.39485046e-02 -3.26147020e-01] [-2.37111494e-01 -3.16664785e-01 -4.29414093e-01]] [[ 3.39498818e-01 4.34197426e-01 2.61163324e-01] [ 2.96125591e-01 6.30766749e-02 -1.48551971e-01] [-2.04828635e-01 -2.68663287e-01 -4.68664706e-01]] [[ 5.20952791e-02 1.26757517e-01 5.13066724e-02] [-1.54216304e-01 1.27303347e-01 5.10577112e-03] [-1.38535742e-02 -2.35472292e-01 -1.14686549e-01]]] [[[-7.84049332e-02 -1.86174475e-02 9.53090116e-02] [-1.22842804e-01 1.02609396e-02 1.38994798e-01] [-1.11310884e-01 1.25922695e-01 1.80290490e-01]] [[-2.50101537e-01 -1.97451964e-01 8.43051374e-02] [-1.63394257e-01 -2.45421641e-02 1.22322232e-01] [-1.10611863e-01 4.00208170e-03 1.78452820e-01]] [[-2.30570249e-02 2.43468732e-02 1.93510681e-01] [-2.06400350e-01 1.15230940e-02 1.03151456e-01] [-4.69967425e-02 7.59930611e-02 1.51867568e-01]]] [[[-1.27221523e-02 -2.49238382e-03 8.36617500e-03] [-2.77287569e-02 -1.16607756e-04 4.07919614e-03] [-3.01736947e-02 -2.04785429e-02 -6.26348192e-03]] [[-2.72265635e-02 -2.79248245e-02 -1.03645949e-02] [-2.41047163e-02 -2.36889794e-02 8.06364405e-04] [-2.32501943e-02 -2.00510267e-02 1.51562865e-03]] [[-1.39369285e-02 -3.17132473e-02 -2.68528759e-02] [-4.25120536e-03 -1.49036171e-02 -5.95835445e-04] [-8.87892675e-03 -1.64482612e-02 -9.38815624e-03]]] [[[-4.38917428e-02 -1.16293728e-01 -6.84261695e-02] [-5.74721433e-02 -1.22569449e-01 -1.52162313e-01] [ 4.98240534e-03 -9.59625691e-02 -1.12204500e-01]] [[-5.38447127e-02 -3.84530537e-02 -4.63660248e-03] [ 1.17157241e-02 -2.55785119e-02 -5.73641574e-03] [ 5.00605404e-02 -1.47240134e-02 1.13022039e-02]] [[-1.91540942e-02 -6.54362887e-02 -3.04396916e-02] [ 6.21595141e-03 3.01347412e-02 4.39182222e-02] [ 5.25878482e-02 4.91308905e-02 6.98990375e-02]]] [[[-1.46309496e-03 9.12385527e-03 3.08206994e-02] [-3.80585110e-03 -3.81508656e-03 5.03432751e-02] [ 4.08498049e-02 8.80996808e-02 1.22935139e-01]] [[ 4.81613800e-02 2.29146238e-02 -2.82667782e-02] [ 5.70256598e-02 2.83022281e-02 5.52848391e-02] [ 1.76027212e-02 1.01964451e-01 1.37629166e-01]] [[ 2.45439596e-02 2.76081171e-02 -1.07265357e-02] [-4.66378368e-02 -3.42933573e-02 8.83975066e-03] [-2.82661021e-02 1.89348906e-02 3.23766395e-02]]] [[[ 8.99920389e-02 8.63246694e-02 6.21820502e-02] [ 3.41172814e-02 7.88429007e-02 1.03779905e-01] [-1.54874742e-03 1.16031416e-01 1.50894240e-01]] [[ 2.75607873e-03 6.26871875e-03 -6.02213778e-02] [ 1.06142079e-02 3.46064009e-02 1.08221779e-02] [-3.92941907e-02 2.33856682e-02 3.66214588e-02]] [[ 5.52414171e-02 2.33600419e-02 -5.42076584e-03] [-2.04358455e-02 -1.54962298e-02 -4.60756309e-02] [-3.78624722e-02 1.89115852e-03 -2.70520337e-03]]] [[[ 5.87712526e-02 2.51914654e-02 1.08421080e-01] [ 2.93965265e-02 -1.00023329e-01 -9.71960500e-02] [ 4.13462631e-02 -2.34382153e-01 -3.49721938e-01]] [[-2.76685078e-02 -1.84212215e-02 -1.77112464e-02] [-3.39081511e-02 -9.86262411e-02 -6.23201057e-02] [ 5.05372621e-02 -7.04121441e-02 -2.22428873e-01]] [[-3.32143828e-02 -3.94973978e-02 -1.12504710e-03] [-5.96313330e-04 -2.14654822e-02 -5.74261532e-04] [ 5.40604107e-02 2.79192929e-03 5.05764484e-02]]]] tf_layers_dict: KerasTensor(type_spec=TensorSpec(shape=(1, 112, 112, 16), dtype=tf.float32, name=None), name='conv2d/Conv2D:0', description="created by layer 'conv2d'") ==================================================================================== layer_type: Const layer_id: 3 tf_layers_dict_shape: (1, 16, 1, 1) tf_layers_dict_value: [[[[ 1.9170843 ]] [[-0.05211098]] [[ 0.07338348]] [[-0.9777949 ]] [[-0.40412796]] [[ 0.9435003 ]] [[ 0.8182072 ]] [[-0.34414697]] [[-0.5237893 ]] [[ 1.1847252 ]] [[ 0.87586915]] [[-0.25714302]] [[-0.07764916]] [[ 0.46551746]] [[ 0.10781193]] [[-0.53103 ]]]] ==================================================================================== layer_type: Add layer_id: 4 input_layer0: layer_id=2: KerasTensor(type_spec=TensorSpec(shape=(1, 112, 112, 16), dtype=tf.float32, name=None), name='conv2d/Conv2D:0', description="created by layer 'conv2d'") input_layer1_value: layer_id=3: [[[[ 1.9170843 ]] [[-0.05211098]] [[ 0.07338348]] [[-0.9777949 ]] [[-0.40412796]] [[ 0.9435003 ]] [[ 0.8182072 ]] [[-0.34414697]] [[-0.5237893 ]] [[ 1.1847252 ]] [[ 0.87586915]] [[-0.25714302]] [[-0.07764916]] [[ 0.46551746]] [[ 0.10781193]] [[-0.53103 ]]]] tf_layers_dict: KerasTensor(type_spec=TensorSpec(shape=(1, 112, 112, 16), dtype=tf.float32, name=None), name='tf.math.add/Add:0', description="created by layer 'tf.math.add'") ==================================================================================== layer_type: ReLU layer_id: 5 input_layer0: layer_id=4: KerasTensor(type_spec=TensorSpec(shape=(1, 112, 112, 16), dtype=tf.float32, name=None), name='tf.math.add/Add:0', description="created by layer 'tf.math.add'") tf_layers_dict: KerasTensor(type_spec=TensorSpec(shape=(1, 112, 112, 16), dtype=tf.float32, name=None), name='tf.nn.relu/Relu:0', description="created by layer 'tf.nn.relu'") ==================================================================================== layer_type: Const layer_id: 6 tf_layers_dict_shape: (4, 8, 4, 1, 1) tf_layers_dict_value: [[[[[ 1.19110167e-01]] [[-2.43403003e-01]] [[-4.26532716e-01]] [[ 2.03961682e+00]]] [[[ 5.42371511e-01]] [[ 4.68978912e-01]] [[-4.40133721e-01]] [[-2.22806469e-01]]] [[[ 5.21311402e-01]] [[ 2.28366286e-01]] [[-2.92699665e-01]] [[ 1.92768425e-01]]] [[[-6.84161559e-02]] [[ 4.30645674e-01]] [[ 1.83314577e-01]] [[ 9.21006024e-01]]] [[[ 3.37727994e-01]] [[ 5.74683100e-02]] [[-2.15459839e-01]] [[-1.19245514e-01]]] [[[ 3.45545113e-01]] [[ 1.21678248e-01]] [[-1.84650972e-01]] [[-4.33625162e-01]]] [[[-4.57264602e-01]] [[-3.59803379e-01]] [[ 3.64851892e-01]] [[-2.89101135e-02]]] [[[ 9.28452790e-01]] [[ 4.07761633e-01]] [[ 5.05645573e-01]] [[ 6.45021871e-02]]]] [[[[ 1.17235743e-01]] [[ 2.13175058e-01]] [[ 5.49685629e-03]] [[ 1.06306088e+00]]] [[[-1.06032775e-03]] [[ 4.93611395e-02]] [[-6.07928276e-01]] [[-4.13630098e-01]]] [[[-2.51309365e-01]] [[-5.84223151e-01]] [[-4.40379560e-01]] [[-3.01257014e-01]]] [[[ 1.24627972e+00]] [[ 2.67296424e-03]] [[ 1.80004150e-01]] [[ 7.50545505e-03]]] [[[ 1.94647267e-01]] [[ 7.50742674e-01]] [[ 2.79620618e-01]] [[-7.56067187e-02]]] [[[ 3.73886853e-01]] [[ 8.56714427e-01]] [[ 1.96713984e-01]] [[-2.75670975e-01]]] [[[ 8.79809976e-01]] [[-1.65559039e-01]] [[ 1.01156366e+00]] [[ 2.56412290e-02]]] [[[ 1.06358491e-01]] [[-4.65295613e-01]] [[-4.70343888e-01]] [[-3.05109262e-01]]]] [[[[-1.71371438e-02]] [[ 3.15459311e-01]] [[-1.26310587e-01]] [[ 3.26123945e-02]]] [[[-5.90606220e-02]] [[ 1.14491887e-01]] [[-2.58961886e-01]] [[ 9.08499770e-03]]] [[[-1.53079256e-01]] [[ 2.36206308e-01]] [[-3.03286731e-01]] [[ 4.97471616e-02]]] [[[ 4.57709104e-01]] [[-2.89963961e-01]] [[ 1.08067304e-01]] [[ 1.35146752e-02]]] [[[ 2.53892094e-01]] [[-7.19368234e-02]] [[-1.04241580e-01]] [[ 4.05883580e-01]]] [[[ 1.37213781e-01]] [[ 8.17646563e-01]] [[-2.89246827e-01]] [[-2.18602628e-01]]] [[[ 2.70227283e-01]] [[-2.43380159e-01]] [[-5.13692796e-01]] [[ 1.97794408e-01]]] [[[ 4.29308504e-01]] [[-4.88698035e-01]] [[ 2.38950208e-01]] [[ 3.37055027e-02]]]] [[[[-5.77578783e-01]] [[ 2.53471017e-01]] [[ 3.97870764e-02]] [[-4.88725722e-01]]] [[[ 2.58779556e-01]] [[-8.62210691e-01]] [[ 1.06393434e-01]] [[ 4.17656302e-02]]] [[[ 2.25161701e-01]] [[-1.77348137e-01]] [[-3.62259448e-01]] [[ 2.43799031e-01]]] [[[-2.90569276e-01]] [[ 6.02877438e-02]] [[-3.52760762e-01]] [[ 1.37581313e+00]]] [[[ 2.85816751e-02]] [[-1.56066203e-02]] [[-3.45287383e-01]] [[-1.10231981e-01]]] [[[ 6.58382475e-01]] [[ 2.38911182e-01]] [[-2.57272571e-01]] [[ 4.67796117e-01]]] [[[ 6.18092418e-01]] [[-8.75321478e-02]] [[-4.00993377e-01]] [[ 1.76268876e-01]]] [[[-1.18035093e-01]] [[ 2.20247358e-01]] [[ 2.33148530e-01]] [[-2.40232244e-01]]]]] ==================================================================================== ERROR: Eager execution of tf.constant with unsupported shape (value has 32 elements, shape is (1, 1, 4, 4) with 16 elements). ERROR: model_path : D:/tflite/light_head_pose.xml ERROR: weights_path: D:/tflite/light_head_pose.bin ERROR: layer_id : 7 ERROR: input_layer0 layer_id=5: KerasTensor(type_spec=TensorSpec(shape=(1, 112, 112, 16), dtype=tf.float32, name=None), name='tf.nn.relu/Relu:0', description="created by layer 'tf.nn.relu'") ERROR: input_layer1 layer_id=6: Const(ndarray).shape (4, 8, 4, 1, 1) array([[[[[ 1.19110167e-01]], [[-2.43403003e-01]], [[-4.26532716e-01]], [[ 2.03961682e+00]]], [[[ 5.42371511e-01]], [[ 4.68978912e-01]], [[-4.40133721e-01]], [[-2.22806469e-01]]], [[[ 5.21311402e-01]], [[ 2.28366286e-01]], [[-2.92699665e-01]], [[ 1.92768425e-01]]], [[[-6.84161559e-02]], [[ 4.30645674e-01]], [[ 1.83314577e-01]], [[ 9.21006024e-01]]], [[[ 3.37727994e-01]], [[ 5.74683100e-02]], [[-2.15459839e-01]], [[-1.19245514e-01]]], [[[ 3.45545113e-01]], [[ 1.21678248e-01]], [[-1.84650972e-01]], [[-4.33625162e-01]]], [[[-4.57264602e-01]], [[-3.59803379e-01]], [[ 3.64851892e-01]], [[-2.89101135e-02]]], [[[ 9.28452790e-01]], [[ 4.07761633e-01]], [[ 5.05645573e-01]], [[ 6.45021871e-02]]]], [[[[ 1.17235743e-01]], [[ 2.13175058e-01]], [[ 5.49685629e-03]], [[ 1.06306088e+00]]], [[[-1.06032775e-03]], [[ 4.93611395e-02]], [[-6.07928276e-01]], [[-4.13630098e-01]]], [[[-2.51309365e-01]], [[-5.84223151e-01]], [[-4.40379560e-01]], [[-3.01257014e-01]]], [[[ 1.24627972e+00]], [[ 2.67296424e-03]], [[ 1.80004150e-01]], [[ 7.50545505e-03]]], [[[ 1.94647267e-01]], [[ 7.50742674e-01]], [[ 2.79620618e-01]], [[-7.56067187e-02]]], [[[ 3.73886853e-01]], [[ 8.56714427e-01]], [[ 1.96713984e-01]], [[-2.75670975e-01]]], [[[ 8.79809976e-01]], [[-1.65559039e-01]], [[ 1.01156366e+00]], [[ 2.56412290e-02]]], [[[ 1.06358491e-01]], [[-4.65295613e-01]], [[-4.70343888e-01]], [[-3.05109262e-01]]]], [[[[-1.71371438e-02]], [[ 3.15459311e-01]], [[-1.26310587e-01]], [[ 3.26123945e-02]]], [[[-5.90606220e-02]], [[ 1.14491887e-01]], [[-2.58961886e-01]], [[ 9.08499770e-03]]], [[[-1.53079256e-01]], [[ 2.36206308e-01]], [[-3.03286731e-01]], [[ 4.97471616e-02]]], [[[ 4.57709104e-01]], [[-2.89963961e-01]], [[ 1.08067304e-01]], [[ 1.35146752e-02]]], [[[ 2.53892094e-01]], [[-7.19368234e-02]], [[-1.04241580e-01]], [[ 4.05883580e-01]]], [[[ 1.37213781e-01]], [[ 8.17646563e-01]], [[-2.89246827e-01]], [[-2.18602628e-01]]], [[[ 2.70227283e-01]], [[-2.43380159e-01]], [[-5.13692796e-01]], [[ 1.97794408e-01]]], [[[ 4.29308504e-01]], [[-4.88698035e-01]], [[ 2.38950208e-01]], [[ 3.37055027e-02]]]], [[[[-5.77578783e-01]], [[ 2.53471017e-01]], [[ 3.97870764e-02]], [[-4.88725722e-01]]], [[[ 2.58779556e-01]], [[-8.62210691e-01]], [[ 1.06393434e-01]], [[ 4.17656302e-02]]], [[[ 2.25161701e-01]], [[-1.77348137e-01]], [[-3.62259448e-01]], [[ 2.43799031e-01]]], [[[-2.90569276e-01]], [[ 6.02877438e-02]], [[-3.52760762e-01]], [[ 1.37581313e+00]]], [[[ 2.85816751e-02]], [[-1.56066203e-02]], [[-3.45287383e-01]], [[-1.10231981e-01]]], [[[ 6.58382475e-01]], [[ 2.38911182e-01]], [[-2.57272571e-01]], [[ 4.67796117e-01]]], [[[ 6.18092418e-01]], [[-8.75321478e-02]], [[-4.00993377e-01]], [[ 1.76268876e-01]]], [[[-1.18035093e-01]], [[ 2.20247358e-01]], [[ 2.33148530e-01]], [[-2.40232244e-01]]]]], dtype=float32) ERROR: The trace log is below. Traceback (most recent call last): File "E:/Desk/openvino2tensorflow-1.29.5/openvino2tensorflow/openvino2tensorflow.py", line 1985, in convert x_outputs = [conv(x_split) for x_split, conv in zip(x_splits, convs)] File "E:/Desk/openvino2tensorflow-1.29.5/openvino2tensorflow/openvino2tensorflow.py", line 1985, in x_outputs = [conv(x_split) for x_split, conv in zip(x_splits, convs)] File "E:\miniconda3\envs\openvino\lib\site-packages\tensorflow\python\keras\engine\base_layer.py", line 970, in __call__ input_list) File "E:\miniconda3\envs\openvino\lib\site-packages\tensorflow\python\keras\engine\base_layer.py", line 1108, in _functional_construction_call inputs, input_masks, args, kwargs) File "E:\miniconda3\envs\openvino\lib\site-packages\tensorflow\python\keras\engine\base_layer.py", line 840, in _keras_tensor_symbolic_call return self._infer_output_signature(inputs, args, kwargs, input_masks) File "E:\miniconda3\envs\openvino\lib\site-packages\tensorflow\python\keras\engine\base_layer.py", line 878, in _infer_output_signature self._maybe_build(inputs) File "E:\miniconda3\envs\openvino\lib\site-packages\tensorflow\python\keras\engine\base_layer.py", line 2625, in _maybe_build self.build(input_shapes) # pylint:disable=not-callable File "E:\miniconda3\envs\openvino\lib\site-packages\tensorflow\python\keras\layers\convolutional.py", line 204, in build dtype=self.dtype) File "E:\miniconda3\envs\openvino\lib\site-packages\tensorflow\python\keras\engine\base_layer.py", line 655, in add_weight caching_device=caching_device) File "E:\miniconda3\envs\openvino\lib\site-packages\tensorflow\python\training\tracking\base.py", line 815, in _add_variable_with_custom_getter **kwargs_for_getter) File "E:\miniconda3\envs\openvino\lib\site-packages\tensorflow\python\keras\engine\base_layer_utils.py", line 139, in make_variable shape=variable_shape if variable_shape else None) File "E:\miniconda3\envs\openvino\lib\site-packages\tensorflow\python\ops\variables.py", line 260, in __call__ return cls._variable_v1_call(*args, **kwargs) File "E:\miniconda3\envs\openvino\lib\site-packages\tensorflow\python\ops\variables.py", line 221, in _variable_v1_call shape=shape) File "E:\miniconda3\envs\openvino\lib\site-packages\tensorflow\python\ops\variables.py", line 199, in previous_getter = lambda **kwargs: default_variable_creator(None, **kwargs) File "E:\miniconda3\envs\openvino\lib\site-packages\tensorflow\python\ops\variable_scope.py", line 2626, in default_variable_creator shape=shape) File "E:\miniconda3\envs\openvino\lib\site-packages\tensorflow\python\ops\variables.py", line 264, in __call__ return super(VariableMetaclass, cls).__call__(*args, **kwargs) File "E:\miniconda3\envs\openvino\lib\site-packages\tensorflow\python\ops\resource_variable_ops.py", line 1595, in __init__ distribute_strategy=distribute_strategy) File "E:\miniconda3\envs\openvino\lib\site-packages\tensorflow\python\ops\resource_variable_ops.py", line 1722, in _init_from_args initial_value = initial_value() File "E:\miniconda3\envs\openvino\lib\site-packages\tensorflow\python\keras\initializers\initializers_v2.py", line 233, in __call__ self.value, dtype=_get_dtype(dtype), shape=shape) File "E:\miniconda3\envs\openvino\lib\site-packages\tensorflow\python\framework\constant_op.py", line 265, in constant allow_broadcast=True) File "E:\miniconda3\envs\openvino\lib\site-packages\tensorflow\python\framework\constant_op.py", line 276, in _constant_impl return _constant_eager_impl(ctx, value, dtype, shape, verify_shape) File "E:\miniconda3\envs\openvino\lib\site-packages\tensorflow\python\framework\constant_op.py", line 325, in _constant_eager_impl (num_t, shape, shape.num_elements())) TypeError: Eager execution of tf.constant with unsupported shape (value has 32 elements, shape is (1, 1, 4, 4) with 16 elements). ERROR: Please refer to 6-7 in the README first. https://github.com/PINTO0309/openvino2tensorflow ```

Source code for simple inference testing code

No response

PINTO0309 commented 2 years ago

Fixed: commit 72987ea548b30269380f73fa72d75bae3258316d Release: v1.30.1 https://github.com/PINTO0309/openvino2tensorflow/releases/tag/v1.30.1

PINTO0309 commented 2 years ago

https://github.com/PINTO0309/PINTO_model_zoo/tree/main/293_Lightweight-Head-Pose-Estimation