Toybrick

rknn-toolkit mul算子不支持broadcast

markluo

注册会员

积分
80
楼主
发表于 2020-12-29 20:41:34    查看: 9531|回复: 0 | [复制链接]    打印 | 只看该作者
rknn-toolkit 版本:1.4.0

转换路径:caffe模型转rknn

报错日志
E Catch exception when building RKNN model!
E Traceback (most recent call last):
E   File "/home/users/luozhiwen/miniconda3/envs/py3.6/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1659, in _create_c_op
E     c_op = c_api.TF_FinishOperation(op_desc)
E tensorflow.python.framework.errors_impl.InvalidArgumentError: Dimensions must be equal, but are 56 and 256 for 'elementwise_mul_20_elementwise_mul_0_17_2/elementwise_mul_20_elementwise_mul_0_17' (op: 'Mul') with input shapes: [1,256,56,56], [1,256].
E During handling of the above exception, another exception occurred:
E Traceback (most recent call last):
E   File "rknn/api/rknn_base.py", line 895, in rknn.api.rknn_base.RKNNBase.build
E   File "rknn/api/rknn_base.py", line 1797, in rknn.api.rknn_base.RKNNBase._quantize2
E   File "rknn/base/RKNNlib/app/medusa/quantization.py", line 105, in rknn.base.RKNNlib.app.medusa.quantization.Quantization.run
E   File "rknn/base/RKNNlib/app/medusa/quantization.py", line 44, in rknn.base.RKNNlib.app.medusa.quantization.Quantization._run_quantization
E   File "rknn/base/RKNNlib/app/medusa/workspace.py", line 139, in rknn.base.RKNNlib.app.medusa.workspace.Workspace.run
E   File "rknn/base/RKNNlib/app/medusa/workspace.py", line 109, in rknn.base.RKNNlib.app.medusa.workspace.Workspace._setup_graph
E   File "rknn/base/RKNNlib/app/medusa/workspace.py", line 110, in rknn.base.RKNNlib.app.medusa.workspace.Workspace._setup_graph
E   File "rknn/base/RKNNlib/RKNNnetbuilder.py", line 274, in rknn.base.RKNNlib.RKNNnetbuilder.RKNNNetBuilder.build
E   File "rknn/base/RKNNlib/RKNNnetbuilder.py", line 278, in rknn.base.RKNNlib.RKNNnetbuilder.RKNNNetBuilder.build
E   File "rknn/base/RKNNlib/RKNNnetbuilder.py", line 305, in rknn.base.RKNNlib.RKNNnetbuilder.RKNNNetBuilder.build_layer
E   File "rknn/base/RKNNlib/RKNNnetbuilder.py", line 305, in rknn.base.RKNNlib.RKNNnetbuilder.RKNNNetBuilder.build_layer
E   File "rknn/base/RKNNlib/RKNNnetbuilder.py", line 305, in rknn.base.RKNNlib.RKNNnetbuilder.RKNNNetBuilder.build_layer
E   [Previous line repeated 39 more times]
E   File "rknn/base/RKNNlib/RKNNnetbuilder.py", line 331, in rknn.base.RKNNlib.RKNNnetbuilder.RKNNNetBuilder.build_layer
E   File "rknn/base/RKNNlib/RKNNnetbuilder.py", line 336, in rknn.base.RKNNlib.RKNNnetbuilder.RKNNNetBuilder.build_layer
E   File "rknn/base/RKNNlib/layer/RKNNlayer.py", line 287, in rknn.base.RKNNlib.layer.RKNNlayer.RKNNLayer.compute_tensor
E   File "rknn/base/RKNNlib/layer/multiplylayer.py", line 80, in rknn.base.RKNNlib.layer.multiplylayer.MultiplyLayer.compute_out_tensor
E   File "/home/users/luozhiwen/miniconda3/envs/py3.6/lib/python3.6/site-packages/tensorflow/python/util/dispatch.py", line 180, in wrapper
E     return target(*args, **kwargs)
E   File "/home/users/luozhiwen/miniconda3/envs/py3.6/lib/python3.6/site-packages/tensorflow/python/ops/math_ops.py", line 248, in multiply
E     return gen_math_ops.mul(x, y, name)
E   File "/home/users/luozhiwen/miniconda3/envs/py3.6/lib/python3.6/site-packages/tensorflow/python/ops/gen_math_ops.py", line 5860, in mul
E     "Mul", x=x, y=y, name=name)
E   File "/home/users/luozhiwen/miniconda3/envs/py3.6/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 788, in _apply_op_helper
E     op_def=op_def)
E   File "/home/users/luozhiwen/miniconda3/envs/py3.6/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 507, in new_func
E     return func(*args, **kwargs)
E   File "/home/users/luozhiwen/miniconda3/envs/py3.6/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3300, in create_op
E     op_def=op_def)
E   File "/home/users/luozhiwen/miniconda3/envs/py3.6/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1823, in __init__
E     control_input_ops)
E   File "/home/users/luozhiwen/miniconda3/envs/py3.6/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1662, in _create_c_op
E     raise ValueError(str(e))
E ValueError: Dimensions must be equal, but are 56 and 256 for 'elementwise_mul_20_elementwise_mul_0_17_2/elementwise_mul_20_elementwise_mul_0_17' (op: 'Mul') with input shapes: [1,256,56,56], [1,256].
Build model failed!


问题:想请问一下elementwise mul算子目前还不支持broadcast功能吗?
回复

使用道具 举报

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

本版积分规则

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


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