Toybrick

rk3399pro板子跑示例代码mobilenetv1失败

sunkai

中级会员

积分
310
楼主
发表于 2021-3-19 16:00:15    查看: 14429|回复: 1 | [复制链接]    打印 | 只看该作者
刷了3.0的固件,运行rknn-toolkit中的例子mobilenetv1失败,打印信息如下,在板子上直接运行的,需要设置什么吗?


toybrick@debian10:~/rknn/examples/tflite/mobilenet_v1$ python3 test.py
--> config model
done
--> Loading model
done
--> Building model
W The target_platform is not set in config, using default target platform rk1808.
W The channel_mean_value is deprecated. Please use mean_values and std_values to replace it.
W:tensorflow:From /home/toybrick/.local/lib/python3.7/site-packages/tensorflow_core/python/framework/func_graph.py:915: py_func (from tensorflow.python.ops.script_ops) is deprecated and will be removed in a future version.
Instructions for updating:
tf.py_func is deprecated in TF V2. Instead, there are two
    options available in V2.
    - tf.py_function takes a python function which manipulates tf eager
    tensors instead of numpy arrays. It's easy to convert a tf eager tensor to
    an ndarray (just call tensor.numpy()) but having access to eager tensors
    means `tf.py_function`s can use accelerators such as GPUs as well as
    being differentiable using a gradient tape.
    - tf.numpy_function maintains the semantics of the deprecated tf.py_func
    (it is not differentiable, and manipulates numpy arrays). It drops the
    stateful argument making all functions stateful.

W:tensorflow:From /home/toybrick/.local/lib/python3.7/site-packages/tensorflow_core/python/ops/resource_variable_ops.py:1630: calling BaseResourceVariable.__init__ (from tensorflow.python.ops.resource_variable_ops) with constraint is deprecated and will be removed in a future version.
Instructions for updating:
If using Keras pass *_constraint arguments to layers.
done
--> Export RKNN model
done
--> Init runtime environment
E Catch exception when init runtime!
E Traceback (most recent call last):
E   File "rknn/api/rknn_base.py", line 815, in rknn.api.rknn_base.RKNNBase.init_runtime
E   File "rknn/api/rknn_runtime.py", line 170, in rknn.api.rknn_runtime.RKNNRuntime.__init__
E   File "rknn/api/rknn_platform_utils.py", line 294, in rknn.api.rknn_platform_utils.start_ntp_or_adb
E   File "rknn/api/rknn_platform_utils.py", line 149, in rknn.api.rknn_platform_utils.weather_device_use_ntb
E   File "rknn/api/rknn_utils.py", line 56, in rknn.api.rknn_utils.exec_command
E   File "/usr/lib/python3.7/subprocess.py", line 395, in check_output
E     **kwargs).stdout
E   File "/usr/lib/python3.7/subprocess.py", line 472, in run
E     with Popen(*popenargs, **kwargs) as process:
E   File "/usr/lib/python3.7/subprocess.py", line 775, in __init__
E     restore_signals, start_new_session)
E   File "/usr/lib/python3.7/subprocess.py", line 1453, in _execute_child
E     restore_signals, start_new_session, preexec_fn)
E OSError: [Errno 12] Cannot allocate memory
Init runtime environment failed


回复

使用道具 举报

sunkai

中级会员

积分
310
沙发
 楼主| 发表于 2021-3-20 09:29:27 | 只看该作者
需要设置target和devices吗?我直接在板子上跑的应该不需要设置吧
回复

使用道具 举报

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

本版积分规则

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


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