Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tensorflow to Barracuda(FusedBatchNormV3) #13

Closed
Robin2091 opened this issue Jan 10, 2020 · 5 comments
Closed

Tensorflow to Barracuda(FusedBatchNormV3) #13

Robin2091 opened this issue Jan 10, 2020 · 5 comments
Assignees

Comments

@Robin2091
Copy link

Robin2091 commented Jan 10, 2020

I have a yolov3tiny model in a frozen graph (.pb) file. When I run the tensorflow_to_barracuda.py script I get the following error.

IGNORED: FusedBatchNormV3 unknown layer
Traceback (most recent call last):
File "tensorflow_to_barracuda.py", line 26, in
tf2bc.convert(args.source_file, args.target_file, args.trim_unused_by_output, args)
File "C:\Users\sudes\Documents\barracuda-release\Tools\tensorflow_to_barracuda.py", line 1347, in convert
process_model(i_model, args)
File "C:\Users\sudes\Documents\barracuda-release\Tools\tensorflow_to_barracuda.py", line 1209, in process_model
process_layer(node, o_context, args)
File "C:\Users\sudes\Documents\barracuda-release\Tools\tensorflow_to_barracuda.py", line 1084, in process_layer
assert(all_elements_equal(input_ranks))
AssertionError

Is this because FusedBatchNormv3 is not supported. If not, when will it be?

@Robin2091 Robin2091 changed the title Tensorflow to Barracuda Tensorflow to Barracuda(FusedBatchNormV3) Jan 10, 2020
@mantasp mantasp self-assigned this Jan 13, 2020
@mantasp
Copy link
Contributor

mantasp commented Jan 22, 2020

@Robin2091 any chance you could share your model? It might be with random weights.
Thanks!

@MarkTension
Copy link

MarkTension commented Feb 5, 2020

Hey @mantasp ! I have the same problem. IGNORED: FusedBatchNormV3 unknown layer.
I used mobilenet pretrained on imagenet from keras (keras.applications.mobilenet.MobileNet(.....)).
Seems like it's not supported from the documentation, but would be really helpful if support is added later, because basically all keras networks have fused batchnormv3 .

If you'd like to check download from here for your comfort.
https://drive.google.com/file/d/1VOKgwqitPusfgHsDdJqN6k8fqG2ZT27v/view?usp=sharing

@mantasp
Copy link
Contributor

mantasp commented Feb 13, 2020

Thank you! adding it to our issue tracker.

@rejunity
Copy link

@Robin2091 @MarkTension I just implemented support for FusedBatchNormV3 and FusedBatchNormV2. Will be shipped with the next release.

Meanwhile you could try my fix locally. Just replace Tools/tensorflow_to_barracuda.py with the one in this zip: tensorflow_to_barracuda.py.zip.
Hope it helps.

@MarkTension
Copy link

MarkTension commented Feb 13, 2020

Thank you! @rejunity It seems though that the local fix by itself, combined with the latest barracuda.py file crashes when converting the model.

Traceback (most recent call last):
  File "tensorflow_to_barracuda.py", line 21, in <module>
    tf2bc.convert(args.source_file, args.target_file, args.trim_unused_by_output, args)
  File "/Users/schmark/Unity_Projects/shapeNetwork/tensorflow_to_barracuda.py", line 1393, in convert
    barracuda.setup_constants(o_model,
AttributeError: module 'barracuda' has no attribute 'setup_constants'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants