lain-m21 / pytorch-to-tflite-example

Convert MobileNetV3Small defined and pre-trained in PyTorch to a TFLite quantized model
75 stars 13 forks source link

convert failed #3

Open pawopawo opened 4 years ago

pawopawo commented 4 years ago
WARNING:tensorflow:From /usr/local/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:517: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.

WARNING:tensorflow:From /usr/local/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:174: The name tf.get_default_session is deprecated. Please use tf.compat.v1.get_default_session instead.

WARNING:tensorflow:From /usr/local/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:181: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.

WARNING:tensorflow:From /usr/local/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:186: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.

2019-12-26 01:26:13.282320: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 AVX512F FMA
2019-12-26 01:26:13.292141: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2499995000 Hz
2019-12-26 01:26:13.296524: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x967b300 executing computations on platform Host. Devices:
2019-12-26 01:26:13.296552: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (0): <undefined>, <undefined>
WARNING:tensorflow:From /usr/local/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:190: The name tf.global_variables is deprecated. Please use tf.compat.v1.global_variables instead.

2019-12-26 01:26:13.312535: W tensorflow/compiler/jit/mark_for_compilation_pass.cc:1412] (One-time warning): Not using XLA:CPU for cluster because envvar TF_XLA_FLAGS=--tf_xla_cpu_global_jit was not set.  If you want XLA:CPU, either set that envvar, or use experimental_jit_scope to enable XLA:CPU.  To confirm that XLA is active, pass --vmodule=xla_compilation_cache=1 (as a proper command-line flag, not via TF_XLA_FLAGS) or set the envvar XLA_FLAGS=--xla_hlo_profile.
Failed to use keras.layers.Add. Fallback to TF lambda.
WARNING:tensorflow:From /usr/local/lib/python3.6/site-packages/onnx2keras/elementwise_layers.py:28: div (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Deprecated in favor of operator or tf.math.divide.
Unable to use `same` padding. Add ZeroPadding2D layer to fix shapes.
WARNING:tensorflow:From /usr/local/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:3980: The name tf.nn.avg_pool is deprecated. Please use tf.nn.avg_pool2d instead.

Failed to use keras.layers.Add. Fallback to TF lambda.
Unable to use `same` padding. Add ZeroPadding2D layer to fix shapes.
Failed to use keras.layers.Add. Fallback to TF lambda.
Unable to use `same` padding. Add ZeroPadding2D layer to fix shapes.
Failed to use keras.layers.Add. Fallback to TF lambda.
Failed to use keras.layers.Add. Fallback to TF lambda.
Failed to use keras.layers.Add. Fallback to TF lambda.
Failed to use keras.layers.Add. Fallback to TF lambda.
Failed to use keras.layers.Add. Fallback to TF lambda.
Failed to use keras.layers.Add. Fallback to TF lambda.
Failed to use keras.layers.Add. Fallback to TF lambda.
Failed to use keras.layers.Add. Fallback to TF lambda.
Failed to use keras.layers.Add. Fallback to TF lambda.
Failed to use keras.layers.Add. Fallback to TF lambda.
Unable to use `same` padding. Add ZeroPadding2D layer to fix shapes.
Failed to use keras.layers.Add. Fallback to TF lambda.
Failed to use keras.layers.Add. Fallback to TF lambda.
Failed to use keras.layers.Add. Fallback to TF lambda.
Unable to use `same` padding. Add ZeroPadding2D layer to fix shapes.
Failed to use keras.layers.Add. Fallback to TF lambda.
Failed to use keras.layers.Add. Fallback to TF lambda.
Failed to use keras.layers.Add. Fallback to TF lambda.
Unable to use `same` padding. Add ZeroPadding2D layer to fix shapes.
Failed to use keras.layers.Add. Fallback to TF lambda.
Failed to use keras.layers.Add. Fallback to TF lambda.
Failed to use keras.layers.Add. Fallback to TF lambda.
Unable to use `same` padding. Add ZeroPadding2D layer to fix shapes.
Failed to use keras.layers.Add. Fallback to TF lambda.
Failed to use keras.layers.Add. Fallback to TF lambda.
Failed to use keras.layers.Add. Fallback to TF lambda.
Unable to use `same` padding. Add ZeroPadding2D layer to fix shapes.
Failed to use keras.layers.Add. Fallback to TF lambda.
Failed to use keras.layers.Add. Fallback to TF lambda.
Failed to use keras.layers.Add. Fallback to TF lambda.
Unable to use `same` padding. Add ZeroPadding2D layer to fix shapes.
Failed to use keras.layers.Add. Fallback to TF lambda.
Failed to use keras.layers.Add. Fallback to TF lambda.
WARNING:tensorflow:From /usr/local/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:1834: The name tf.nn.fused_batch_norm is deprecated. Please use tf.compat.v1.nn.fused_batch_norm instead.

Thank you very much for your work, but after running python3 main.py, there are many failed

mgarbade commented 4 years ago

This is only a warning message, not an error. If you wait for a while the program is able to finish (takes ~1-2 min on my computer)