forked from PINTO0309/PINTO_model_zoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconvert_script.txt
78 lines (48 loc) · 1.62 KB
/
convert_script.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
docker run --gpus all -it --rm \
-v `pwd`:/workspace/resources \
-e LOCAL_UID=$(id -u $USER) \
-e LOCAL_GID=$(id -g $USER) \
pinto0309/tflite2tensorflow:latest bash
source /opt/intel/openvino_2021/bin/setupvars.sh
cd resources
tflite2tensorflow \
--model_path lite-model_yamnet_tflite_1.tflite \
--flatc_path ../flatc \
--schema_path ../schema.fbs \
--output_pb True
tflite2tensorflow \
--model_path lite-model_yamnet_tflite_1.tflite \
--flatc_path ../flatc \
--schema_path ../schema.fbs \
--output_no_quant_float32_tflite True \
--output_weight_quant_tflite True \
--output_float16_quant_tflite True \
--output_tfjs True \
--output_tftrt True \
--output_coreml True \
--output_onnx True \
--onnx_opset 13
tflite2tensorflow \
--model_path model_float32.tflite \
--flatc_path ../flatc \
--schema_path ../schema.fbs
mv model_float32.tflite model_float32_org.tflite
../flatc -o . -b ../schema.fbs model_float32.json
tflite2tensorflow \
--model_path model_float32.tflite \
--flatc_path ../flatc \
--schema_path ../schema.fbs \
--output_pb True
python3 ${INTEL_OPENVINO_DIR}/deployment_tools/model_optimizer/mo.py \
--input_model model_float32.onnx \
--output_dir openvino/FP32 \
--data_type FP32
python3 ${INTEL_OPENVINO_DIR}/deployment_tools/model_optimizer/mo.py \
--input_model model_float32.onnx \
--output_dir openvino/FP16 \
--data_type FP16
#${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/lib/intel64/myriad_compile \
#-m openvino/FP16/model_float32.xml \
#-VPU_NUMBER_OF_SHAVES 4 \
#-VPU_NUMBER_OF_CMX_SLICES 4 \
#-o openvino/myriad/model_float32.blob