OpenVINO 无法使用模型优化器转换 1D CNN 模型

OpenVINO cannot convert 1D CNN model with model optimizer

我将我的 1D CNN .h5 文件转换为 .pb 文件,如图所示。

(需要的请下载我转换的.pb file)

然后我尝试使用模型优化器通过命令

生成.bin和.xml文件
python mo_tf.py --saved_model_dir C:\Users\john0\Desktop\saved_model_LA_A --input_shape [1,2,60] --data_type FP16

但是出现如下错误提示。

[ WARNING ]  Failed to parse a tensor with Unicode characters. Note that Inference Engine does not support string literals, so the string constant should be eliminated from the graph.
[ WARNING ]  Failed to parse a tensor with Unicode characters. Note that Inference Engine does not support string literals, so the string constant should be eliminated from the graph.
[ ERROR ]  Exception occurred during running replacer "REPLACEMENT_ID" (<class 'extensions.front.user_data_repack.UserDataRepack'>): Original placeholders: 'serving_default_embedding_10_input, saver_filename'. Freezing was requested for ''. --input_shape was provided without --input. Can not deduce which node shape to override

我不确定是否支持 1D CNN 模型。

这是我的一维 CNN 模型架构,它是用 TensorFlow 1.15.0 版本训练的。

(我输入的是包含60条信号记录的CSV文件。)

 Layer (type)                Output Shape              Param #
=================================================================
 embedding_10 (Embedding)    (None, 60, 2)             396

 conv1_1 (Conv1D)            (None, 53, 100)           1700

 conv1_2 (Conv1D)            (None, 46, 100)           80100

 max_pooling1d_10 (MaxPoolin  (None, 15, 100)          0
 g1D)

 dropout_19 (Dropout)        (None, 15, 100)           0

 conv2_1 (Conv1D)            (None, 8, 160)            128160

 conv2_2 (Conv1D)            (None, 1, 160)            204960

 global_average_pooling1d_10  (None, 160)              0
  (GlobalAveragePooling1D)

 dropout_20 (Dropout)        (None, 160)               0

 dense (Dense)               (None, 2)                 322

我使用 openvino_2021.4.689 版本 Windows 11,我想使用 NCS2。

安装 openvino-dev 2022.1.0 并使用以下命令转换您的模型:

mo --saved_model_dir=<path_to_saved_model_dir> -b=1

converted_to_IR