简体   繁体   English

张量流批量归一化冻结

[英]tensorflow batch normalization freeze

I'm trying to implement frozen graph on unity. 我试图统一实现冻结图。 But I have some error. 但是我有一些错误。 I think the error related on batch normalization but I have no idea to solve this problem. 我认为该错误与批处理规范化有关,但我不知道要解决此问题。
When I train my model BN is necessary so I can't just remove the BN . 当我训练模型BN是必要的,所以我不能仅仅删除BN

So I have to find some way to how do proper freeze the graph with BN without causing error when it implement on unity. 因此,我必须找到某种方法来实现以BN适当冻结图,而在统一实现时不会引起错误。 Any Idea? 任何想法?

I had already some researches for this problem I know not only the BN cause this error also the dropout has same problem. 我已经对此问题进行了一些研究,我不仅知道BN会导致此错误,而且辍学也存在同样的问题。

note: I'm using tensorflowsharp. 注意:我正在使用tensorflowsharp。 network is based on ResNet34 with little modified. 网络基于ResNet34,几乎没有修改。

error: TFException: Input 0 of node bn2c_branch2a/Assign was passed float from bn2c_branch2a/mean:0 incompatible with expected float_ref.
TensorFlow.TFStatus.CheckMaybeRaise (TensorFlow.TFStatus incomingStatus, System.Boolean last) (at <013bee3700ac45f2a3b8843fa1d4d914>:0)
TensorFlow.TFGraph.Import (TensorFlow.TFBuffer graphDef, TensorFlow.TFImportGraphDefOptions options, TensorFlow.TFStatus status) (at <013bee3700ac45f2a3b8843fa1d4d914>:0)
TensorFlow.TFGraph.Import (System.Byte[] buffer, TensorFlow.TFImportGraphDefOptions options, TensorFlow.TFStatus status) (at <013bee3700ac45f2a3b8843fa1d4d914>:0)
TensorFlow.TFGraph.Import (System.Byte[] buffer, System.String prefix, TensorFlow.TFStatus status) (at <013bee3700ac45f2a3b8843fa1d4d914>:0)
DeepGes.GClassifier.InitClassifier () (at Assets/Scripts/Gesture_Main/GClassifier.cs:42)
G_Game.Awake () (at Assets/Scripts/Gesture_Main/G_Game.cs:67)

I am not exactly sure on what you are asking or working on, however I did some research for you to hopefully point you in the right direction. 我不确定您要问什么或正在做什么,但是我为您做过一些研究,希望可以为您指明正确的方向。

Good Audience - TensorFlow + Unity: How to set up a custom TensorFlow graph in Unity 良好的受众群体-TensorFlow + Unity:如何在Unity中设置自定义TensorFlow图

There is a guy here who is an ML engineer, so maybe try asking him. 这里有一个人是ML工程师,所以也许尝试问问他。
Unity Forums - Using Tensorflow's inference graph in Unity Unity论坛-在Unity中使用Tensorflow的推理图

Best of luck. 祝你好运。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM