Toybrick

是否支持 ELU 算子?

qliu

注册会员

积分
162
楼主
发表于 2019-11-15 15:22:44    查看: 6656|回复: 3 | [复制链接]    打印 | 只看该作者
本帖最后由 qliu 于 2019-11-15 15:23 编辑

在 macOS 上进行模型转换的时候遇到以下错误,这是表示不支持 ELU 算子吗?有什么建议吗?
  1. I Have 8 tensors convert to const tensor
  2. D Const tensors:
  3. D ['out_1/Tensordot/Reshape_1:out0', 'conv2d_transpose_4/stack:out0', 'conv2d_transpose_2_1/stack:out0', 'out_1/Tensordot/stack:out0', 'conv2d_transpose_1_1/stack:out0', 'out_1/Tensordot/concat:out0', 'conv2d_transpose_3_1/stack:out0', 'out_1/Tensordot/concat_1:out0']
  4. 2019-11-15 15:17:09.198570: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
  5. I build output layer attach_out_1/truediv:out0
  6. I build input layer in_1:out0
  7. D Try match RealDiv out_1/truediv
  8. I Match softmax_calc [['out_1/truediv', 'out_1/Exp', 'out_1/Sum', 'out_1/sub', 'out_1/Sum/reduction_indices', 'out_1/Max', 'out_1/Max/reduction_indices']] [['RealDiv', 'Exp', 'Sum', 'Sub', 'C', 'Max', 'C_1']] to [['softmax']]
  9. D Try match BiasAdd out_1/BiasAdd
  10. I Match tensor_dot_bias_add [['out_1/BiasAdd', 'out_1/Tensordot', 'out_1/bias', 'out_1/Tensordot/MatMul', 'out_1/Tensordot/concat_1_out_0_const', 'out_1/Tensordot/Reshape', 'out_1/Tensordot/Reshape_1_out_0_const', 'out_1/Tensordot/transpose', 'out_1/Tensordot/stack_out_0_const', 'out_1/Tensordot/concat_out_0_const']] [['BiasAdd', 'Reshape', 'C', 'MatMul', 'C_1', 'Reshape_1', 'C_2', 'Transpose', 'C_3', 'C_4']] to [['fullconnect']]
  11. D Try match Elu conv2d_17_1/Elu
  12. E Unknow layer "elu"
  13. I ----------------Warning(0)----------------
  14. E Catch exception when loading tensorflow model: ../dl_models/sl_detection/Model_6_sl_detection_1625.pb!
  15. E Traceback (most recent call last):
  16. E   File "rknn/api/rknn_base.py", line 190, in rknn.api.rknn_base.RKNNBase.load_tensorflow
  17. E   File "rknn/base/RKNNlib/converter/convert_tf.py", line 594, in rknn.base.RKNNlib.converter.convert_tf.convert_tf.match_paragraph_and_param
  18. E   File "rknn/base/RKNNlib/RKNNnet.py", line 171, in rknn.base.RKNNlib.RKNNnet.RKNNNet.new_layer
  19. E   File "/Users/qliu/anaconda3/lib/python3.6/site-packages/rknn/base/RKNNlib/RKNNlog.py", line 327, in e
  20. E     raise ValueError(msg)
  21. E ValueError: Unknow layer "elu"
  22.   9709 MainThread failed to load tf model
复制代码




同样的网络在 rk3399pro 上进行模型转换得到了不同的错误,这次没有提示 ELU 的问题?是什么原因呢?
  1. I Have 8 tensors convert to const tensor
  2. ['conv2d_transpose_4/stack:out0', 'conv2d_transpose_2_1/stack:out0', 'out_1/Tensordot/concat_1:out0', 'conv2d_transpose_3_1/stack:out0', 'out_1/Tensordot/concat:out0', 'out_1/Tensordot/stack:out0', 'out_1/Tensordot/Reshape_1:out0', 'conv2d_transpose_1_1/stack:out0']
  3. I build output layer attach_out_1/truediv:out0
  4. I build input layer in_1:out0
  5. D Try match RealDiv out_1/truediv
  6. I Match softmax_calc [['out_1/truediv', 'out_1/Exp', 'out_1/Sum', 'out_1/sub', 'out_1/Sum/reduction_indices', 'out_1/Max', 'out_1/Max/reduction_indices']] [['RealDiv', 'Exp', 'Sum', 'Sub', 'C', 'Max', 'C_1']] to [['softmax']]
  7. D Try match BiasAdd out_1/BiasAdd
  8. I pyfunc exception: 0 functions found! only 1 function is allowed
  9. Traceback (most recent call last):
  10.   File "rknn/base/RKNNlib/converter/convert_tf.py", line 53, in rknn.base.RKNNlib.converter.convert_tf.pyfunc_call
  11.   File "rknn/base/RKNNlib/converter/convert_tf.py", line 39, in rknn.base.RKNNlib.converter.convert_tf.function_builder
  12. ValueError: 0 functions found! only 1 function is allowed

  13.   1 def r_fc_tensor_dot_rule_pre_condition(self, node, tensor):
  14.   2     return True
  15.   3
  16. E Catch exception when loading tensorflow model: ../dl_models/sl_detection/Model_6_sl_detection_1625.pb!
  17. T Traceback (most recent call last):
  18. T   File "rknn/api/rknn_base.py", line 185, in rknn.api.rknn_base.RKNNBase.load_tensorflow
  19. T   File "rknn/base/RKNNlib/converter/convert_tf.py", line 561, in rknn.base.RKNNlib.converter.convert_tf.convert_tf.match_paragraph_and_param
  20. T   File "rknn/base/RKNNlib/converter/convert_tf.py", line 377, in rknn.base.RKNNlib.converter.convert_tf.convert_tf._tf_try_match_ruler
  21. T   File "rknn/base/RKNNlib/converter/convert_tf.py", line 56, in rknn.base.RKNNlib.converter.convert_tf.pyfunc_call
  22. T   File "rknn/base/RKNNlib/converter/convert_tf.py", line 53, in rknn.base.RKNNlib.converter.convert_tf.pyfunc_call
  23. T   File "rknn/base/RKNNlib/converter/convert_tf.py", line 39, in rknn.base.RKNNlib.converter.convert_tf.function_builder
  24. T ValueError: 0 functions found! only 1 function is allowed
复制代码

回复

使用道具 举报

jefferyzhang

版主

积分
13578
沙发
发表于 2019-11-15 15:32:05 | 只看该作者
从你的log来看,是不支持的了。。
回复

使用道具 举报

qliu

注册会员

积分
162
板凳
 楼主| 发表于 2019-11-15 15:37:14 | 只看该作者
jefferyzhang 发表于 2019-11-15 15:32
从你的log来看,是不支持的了。。

请问官方是否有支持的算子的列表?
两个操作系统上的日志为什么差这么多呢?
回复

使用道具 举报

jefferyzhang

版主

积分
13578
地板
发表于 2019-11-15 17:05:57 | 只看该作者
官方支持不会这么快,而且目前重点不会放在支持日益增长的op上,芯片里所支持的算法已经都有了,其他不支持的都得靠编程去兼容芯片或者纯cpu运算。
我们开放了自定义OP的接口,大家是可以自己编写不支持的OP的。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

产品中心 购买渠道 开源社区 Wiki教程 资料下载 关于Toybrick


快速回复 返回顶部 返回列表