wangjing60755
wangjing60755
I meet the same error, how you solve this ?
I meet the same error, how you solve this ?
def _hard_swish(self, x): """Hard swish """ return x * K.relu(x + 3.0, max_value=6.0) / 6.0
A new problem . How to support user-defined functions, similar to the load function in keras has custom_objects. ` model = k.models.load_model(model_path, compile=False, custom_objects={ 'my_fun': my_fun } )`
Here is a example! [LiteRASSP_small256.zip](https://github.com/MarsTechHAN/keras2ncnn/files/6286238/LiteRASSP_small256.zip)
现在模型转换没问题,但是,用CPP推理直接卡死,然后就挂了(其他类似结构模型用你的代码转换之后能成功推理),所以是不是这个hard_swish哪里没弄好?
[seg_ncnn_inference.txt](https://github.com/MarsTechHAN/keras2ncnn/files/6289415/seg_ncnn_inference.txt)
Ncnn result error!  [result_nomatch.zip](https://github.com/MarsTechHAN/keras2ncnn/files/6293662/result_nomatch.zip)
No custom objects, result_nomatch.zip contains inference code with python and c++.
You need model strcuct code ?