Closed tatusya-suda closed 1 year ago
.h5
. This is a deprecated format at this time. saved_model
should be sufficient for your needs.pb_to_saved_model \
--pb_file_path frozen_inference_graph.pb \
--inputs ImageTensor:0 \
--outputs SemanticPredictions:0
saved_model_to_tflite \
--saved_model_dir_path saved_model_from_pb \
--input_shape [1,513,513,3] \
--model_output_dir_path saved_model \
--output_no_quant_float32_tflite
cp saved_model/model_float32.tflite .
tflite2tensorflow \
--model_path model_float32.tflite \
--flatc_path ../flatc \
--schema_path ../schema.fbs \
--output_pb \
--optimizing_for_openvino_and_myriad
saved_model_cli show --dir saved_model --all
2022-08-28 08:57:19.305342: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: SSE3 SSE4.1 SSE4.2 AVX AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
MetaGraphDef with tag-set: 'serve' contains the following SignatureDefs:
signature_def['serving_default']:
The given SavedModel SignatureDef contains the following input(s):
inputs['ImageTensor'] tensor_info:
dtype: DT_UINT8
shape: (1, 513, 513, 3)
name: ImageTensor:0
The given SavedModel SignatureDef contains the following output(s):
outputs['SemanticPredictions'] tensor_info:
dtype: DT_INT64
shape: (1, 513, 513)
name: SemanticPredictions:0
Method name is: tensorflow/serving/predict
1.keras modelに変換して、モデルの剪定を実施したいです。 剪定したモデルをtfliteに変換し、Androidへの実装を目指しています。 https://www.tensorflow.org/model_optimization/guide/pruning/pruning_with_keras
2.モデルはご指定のモデルです。
3.調べたときsub2とResizeBilinearを指定した例があったのでそちらで変換していました。ありがとうございます
If that is the case, then this question is not about openvino2tensorflow
, but about how to use TensorFlow
.
First, delete all unnecessary garbage processing in the range shown below.
Issue Type
Others
OS
Windows
OS architecture
x86_64
Programming Language
Python
Framework
TensorFlow
Download URL for ONNX / OpenVINO IR
https://github.com/tensorflow/models/blob/master/research/deeplab/g3doc/model_zoo.md
Convert Script
!source /opt/intel/openvino_2021/bin/setupvars.sh && pb_to_saved_model \ --pb_file_path frozen_inference_graph.pb \ --inputs sub_2:0 \ --outputs ResizeBilinear_2:0
!source /opt/intel/openvino_2021/bin/setupvars.sh &&\ python3 /opt/intel/openvino_2021/deployment_tools/model_optimizer/mo.py \ --saved_model_dir saved_model_from_pb/ --output_dir model_saved --data_type FP32
Description
https://github.com/tensorflow/models/blob/master/research/deeplab/g3doc/model_zoo.md のxception65_coco_voc_trainaug(.pb)をkeras(h5)に変換したいです。 しかし、openvino2tensorflowを使用して変換するときにpickleエラーが起きます。
環境はpython=3.8,tensorflow=2.5です。
変換ルートはpbからsaved_modelに変換したあと、IR形式に変換しています。
Relevant Log Output
Source code for simple inference testing code
No response