我有使用tensorflow for poets教程生成的模型。 我有表现出相同行为的二进制模型和3类模型。
forzen图的性能符合预期,但是一旦我将其转换为与opencv dnn模块一起使用,预测就变得遥遥无期了,通常比一类更倾向于一类。
以下是每个转换后的摘要图的输出。 以防万一您看到异常情况:
**original**
--------
No inputs spotted.
No variables spotted.
Found 1 possible outputs: (name=final_result, op=Softmax)
Found 21826166 (21.83M) const parameters, 0 (0) variable parameters, and 99 control_edges
Op types used: 489 Const, 101 Identity, 99 CheckNumerics, 94 Relu, 94 BatchNormWithGlobalNormalization, 94 Conv2D, 11 Concat, 9 AvgPool, 5 MaxPool, 1 DecodeJpeg, 1 ExpandDims, 1 Cast, 1 MatMul, 1 Mul, 1 PlaceholderWithDefault, 1 Add, 1 Reshape, 1 ResizeBilinear, 1 Softmax, 1 Sub
-----------------------
**After optimize_for_inference**
----------------------------
Found 1 possible inputs: (name=DecodeJpeg/contents, type=float(1), shape