azeme1 / keras2ncnn

MIT License
24 stars 0 forks source link

KeyError: 'get_relu6_mapping' #14

Closed wangjing60755 closed 3 years ago

wangjing60755 commented 3 years ago

Can you make it support relu6? It is in common use

wangjing60755 commented 3 years ago

unet_ncnn_model_20210222.zip

tf1.9.

azeme1 commented 3 years ago

ReLu6 is supported but you normaly should use the ReLU layer with clip parameter. One second I will check the problem

azeme1 commented 3 years ago

Layer - final_layer inference MAE :: 1.1061612736895654e-09 < 1e-05 True Keras::(1, 160, 160, 2) / NCNN::(1, 160, 160, 2) Estimated float32 inference memory :: 27 MB

azeme1 commented 3 years ago

https://www.dropbox.com/sh/8anok3k3jxjj81i/AADWMLad_V0MKs4ySN2mgPPda?dl=0 The conversion result can be found here model_zoo\variouse\issue_00014

wangjing60755 commented 3 years ago

Where have you changed? I run keras2ncnn.py , an error will be reported about relu6。Can you update the code?

azeme1 commented 3 years ago

Pushed to main from dev.... run_test.py contains example of conversion and verification.

azeme1 commented 3 years ago

Is the problem solved?

wangjing60755 commented 3 years ago

solved. I get the ncnn model ,which inference well. thanks!@azeme1

azeme1 commented 3 years ago

Thanx for the assistance. I close the issue.