xmartlabs / Bender

Easily craft fast Neural Networks on iOS! Use TensorFlow models. Metal under the hood.
https://xmartlabs.github.io/Bender/
MIT License
1.79k stars 90 forks source link

fatal error: Cannot create ConcatV2. Missing or invalid attribute axis. #81

Closed JeremyGozlan closed 6 years ago

JeremyGozlan commented 6 years ago

Hello, just update to your new version, seems to work but i got this error when loading my pb model.

guard let axisInt32 = axisNode.nodeDef.attr["value"]?.tensor.intVal.first, let axis = LayerSizeAxis.fromTF(index: Int(axisInt32)) else { fatalError("Cannot create (Constants.Ops.Concat). Missing or invalid attribute axis.") }

here axistInt32 = 3 , but cannot create concatv2 when axis = LayerSizeAxis.fromTF(index: Int(axisInt32)) Any idea? I am basically trying to convert my pb model which is one derived from https://github.com/Joker316701882/Salience-Object-Detection and then froze. Also some warning "Unknown input: pool4_1:1" "Unknown input: pool4:1" "Unknown input: pool3:1" "Unknown input: pool2:1" "Unknown input: pool1:1" thanks a lot

JeremyGozlan commented 6 years ago

my input tensor ( 1,320,320,3) output (1,320,320,1) any idea on how I can tweak bender a bit to make it work?

JeremyGozlan commented 6 years ago

Is there a way maybe in tensor flow to reshape input/output tensor to 3d from 4d ?

bryant1410 commented 6 years ago

Can you try setting the first dimension as None in python? And see if that works.