Reputation: 13
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.
So I have to find some way to how do proper freeze the graph with BN without causing error when it implement on unity. 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.
note: I'm using tensorflowsharp. network is based on ResNet34 with little modified.
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)
Upvotes: 0
Views: 827
Reputation: 219
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
There is a guy here who is an ML engineer, so maybe try asking him.
Unity Forums - Using Tensorflow's inference graph in Unity
Best of luck.
Upvotes: 0