TOCO-尺寸必须匹配(Concat运算符)

时间:2018-08-26 10:40:23

标签: tensorflow tensorflow-lite toco

我正在使用TOCO将语义分割模型转换为8位量化的TFLite,但是,出现以下错误。

tensorflow/contrib/lite/toco/graph_transformations/propagate_fixed_sizes.cc:116] Check failed: dim_x == dim_y (3 vs. 13)Dimensions must match
    Abort trap: 6

我在轴3上多次使用TF concat运算符,因此尺寸concat([1,20,40,13],[1,20,40,3])= [1,20,40 ,16],这显然是发生错误的地方,但是被调用的函数

bazel build tensorflow/contrib/lite/toco:toco && \
./bazel-bin/tensorflow/contrib/lite/toco/toco \
    --input_file=/path/to/MyModel/log/quantised/optimised_graph.pb \
    --output_file=/path/to/MyModel/log/quantised/quantised_graph.tflite \
    --input_format="TENSORFLOW_GRAPHDEF" \
    --output_format="TFLITE" \
    --inference_type="QUANTIZED_UINT8" \
    --inference_input_type="QUANTIZED_UINT8" \
    --allow_custom_ops=true \
    --drop_control_dependency=false \
    --allow_nudging_weights_to_use_fast_gemm_kernel=true \
    --quantize_weights=false \
    --input_arrays="MyModel/downsampling_block_1_conv/Conv2D","MyModel/downsampling_block_1_pool/MaxPool" \
    --output_arrays="MyModel/Softmax" \
    --input_shapes="1,360,480,3":"1,360,480,3"

允许自定义操作的状态,该操作确实适用于我使用的某些操作,但是此处不起作用。从Googling来看,该错误据说是尚未实现但尚未输入错误,但是可以肯定的是,允许自定义操作可以解决此问题吗?

最后,运行此功能确实会创建输出文件,但是它是一个0字节的空文件

0 个答案:

没有答案