MNN icon indicating copy to clipboard operation
MNN copied to clipboard

.pb 转mnn失败,报错,怎么解决呢

Open jimwan opened this issue 7 years ago • 6 comments

MNNConverter Version: 0.0.0.1 - MNN @ 2018

Start to Convert Other Model Format To MNN Model...


Strongly Recommended: Apply Tensorflow Tool [graph transform] firstly!!! ==> fold_constants


libc++abi.dylib: terminating with uncaught exception of type Error: [16:07:51] /Users/user/Downloads/MNN/tools/converter/source/tensorflow/TmpGraph.cpp:320: Check failed: inputNode->opType == "Const" ==> FusedBatchNorm|SpaceToBatchND Lack Const Tensor Abort trap: 6

jimwan avatar Sep 27 '19 08:09 jimwan

如果使用了bn,生成pb时将bn层training参数设为False; 如果使用了dilation conv,需要固定输入图像大小,然后重新生成pb。

jiarenyf avatar Sep 27 '19 08:09 jiarenyf

我用了bn,然后我在从.h5模型转的时候就把trainable设为False了。然后转换还是一样的错误,有什么办法吗

jimwan avatar Oct 08 '19 01:10 jimwan

@jimwan 不是trainable,是training。。。

jiarenyf avatar Oct 08 '19 09:10 jiarenyf

我没有用bn,也没有用到dilation conv,却也遇到了这个问题,能帮忙提供个建议吗?

leospark avatar Oct 16 '19 10:10 leospark

set training is false

czy2014hust avatar Oct 17 '19 05:10 czy2014hust

@jiarenyf 输入维度是动态的,但是带dilation了.的确无法固定输入的维度应该增么办. 整个网络是基于输入动态调整的. 模型: 4.zip

TPcoding avatar Oct 18 '19 09:10 TPcoding