MarsTechHAN / keras2ncnn

A keras h5df to ncnn model converter
MIT License
89 stars 19 forks source link

请韩佬有空帮我瞅瞅这两个OP,SeparableConv2D 和 BilinearUpsampling #24

Closed xiongzhu666 closed 3 years ago

xiongzhu666 commented 3 years ago

环境:tf2.1,keras2.3 from tensorflow.keras.models import load_model model = load_model("./SOD.h5", custom_objects={'BilinearUpsampling': BilinearUpsampling}, compile=False) 运行预测没有问题。

使用你的仓库,在转换过程中遇到问题: [ERROR] Operator SeparableConv2D not support. 使用另外一个老哥的仓库(https://github.com/azeme1/keras2ncnn)遇到问题: ValueError: Unknown layer: BilinearUpsampling

附上模型文件 SOD.zip

MarsTechHAN commented 3 years ago

SeparableConv2D is support now, but seems like there is other op not supported yet.

[ERROR] Operator Cropping2D not support.
=========================================
{'name': 'cropping2d_1', 'trainable': True, 'dtype': 'float32', 'cropping': [[1, 0], [1, 0]], 'data_format': 'channels_last'}
=========================================
MarsTechHAN commented 3 years ago

Fixed 27cc153b8b79d2b4c8097eb959851bf465a6d4f2