Toybrick

PeimissionError(Debian10运行官方示例)

86667780

注册会员

积分
83
楼主
发表于 2020-5-7 14:50:03    查看: 13514|回复: 3 | [复制链接]    打印 | 只看该作者
报错信息如下,固件版本是Debian10
  1. toybrick@debian10:/usr/share/rknn/mobilenet-ssd$ python3 ssd.py
  2. W:tensorflow:From /home/toybrick/.local/lib/python3.7/site-packages/onnx_tf/handlers/backend/ceil.py:10: The name tf.ceil is deprecated. Please use tf.math.ceil instead.

  3. W:tensorflow:From /home/toybrick/.local/lib/python3.7/site-packages/onnx_tf/handlers/backend/depth_to_space.py:12: The name tf.depth_to_space is deprecated. Please use tf.compat.v1.depth_to_space instead.

  4. W:tensorflow:
  5. The TensorFlow contrib module will not be included in TensorFlow 2.0.
  6. For more information, please see:
  7.   * https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md
  8.   * https://github.com/tensorflow/addons
  9.   * https://github.com/tensorflow/io (for I/O related ops)
  10. If you depend on functionality not listed there, please file an issue.

  11. W:tensorflow:From /home/toybrick/.local/lib/python3.7/site-packages/onnx_tf/handlers/backend/log.py:10: The name tf.log is deprecated. Please use tf.math.log instead.

  12. W:tensorflow:From /home/toybrick/.local/lib/python3.7/site-packages/onnx_tf/handlers/backend/random_normal.py:9: The name tf.random_normal is deprecated. Please use tf.random.normal instead.

  13. W:tensorflow:From /home/toybrick/.local/lib/python3.7/site-packages/onnx_tf/handlers/backend/random_uniform.py:9: The name tf.random_uniform is deprecated. Please use tf.random.uniform instead.

  14. W:tensorflow:From /home/toybrick/.local/lib/python3.7/site-packages/onnx_tf/handlers/backend/upsample.py:13: The name tf.image.resize_images is deprecated. Please use tf.image.resize instead.

  15. /home/toybrick/.local/lib/python3.7/site-packages/onnx_tf/common/__init__.py:87: UserWarning: FrontendHandler.get_outputs_names is deprecated. It will be removed in future release.. Use node.outputs instead.
  16.   warnings.warn(message)
  17. --> Loading model
  18. W:tensorflow:From /home/toybrick/.local/lib/python3.7/site-packages/rknn/api/rknn.py:65: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.
  19. Instructions for updating:
  20. Use `tf.compat.v1.graph_util.extract_sub_graph`
  21. /home/toybrick/.local/lib/python3.7/site-packages/rknn/api/rknn.py:65: FutureWarning: Possible nested set at position 7
  22.   std_values=std_values)
  23. done
  24. --> Building model
  25. W:tensorflow:From /home/toybrick/.local/lib/python3.7/site-packages/tensorflow/python/ops/control_flow_ops.py:1814: py_func (from tensorflow.python.ops.script_ops) is deprecated and will be removed in a future version.
  26. Instructions for updating:
  27. tf.py_func is deprecated in TF V2. Instead, there are two
  28.     options available in V2.
  29.     - tf.py_function takes a python function which manipulates tf eager
  30.     tensors instead of numpy arrays. It's easy to convert a tf eager tensor to
  31.     an ndarray (just call tensor.numpy()) but having access to eager tensors
  32.     means `tf.py_function`s can use accelerators such as GPUs as well as
  33.     being differentiable using a gradient tape.
  34.     - tf.numpy_function maintains the semantics of the deprecated tf.py_func
  35.     (it is not differentiable, and manipulates numpy arrays). It drops the
  36.     stateful argument making all functions stateful.
  37.    
  38. done
  39. E Export RKNN model to [./ssd_mobilenet_v1_coco.rknn] failed.
  40. E Traceback (most recent call last):
  41. E   File "rknn/api/rknn_base.py", line 405, in rknn.api.rknn_base.RKNNBase.export_rknn
  42. E   File "rknn/api/rknn_model.py", line 72, in rknn.api.rknn_model.RKNNModel.save
  43. E PermissionError: [Errno 13] Permission denied: './ssd_mobilenet_v1_coco.rknn'
  44. --> Init runtime environment
  45. E Catch exception when init runtime!
  46. E Traceback (most recent call last):
  47. E   File "rknn/api/rknn_base.py", line 768, in rknn.api.rknn_base.RKNNBase.init_runtime
  48. E   File "rknn/api/rknn_runtime.py", line 144, in rknn.api.rknn_runtime.RKNNRuntime.__init__
  49. E   File "rknn/api/rknn_platform_utils.py", line 253, in rknn.api.rknn_platform_utils.start_ntp_or_adb
  50. E   File "rknn/api/rknn_platform_utils.py", line 118, in rknn.api.rknn_platform_utils.weather_device_use_ntb
  51. E   File "rknn/api/rknn_utils.py", line 91, in rknn.api.rknn_utils.exec_command
  52. E   File "/usr/lib/python3.7/subprocess.py", line 395, in check_output
  53. E     **kwargs).stdout
  54. E   File "/usr/lib/python3.7/subprocess.py", line 472, in run
  55. E     with Popen(*popenargs, **kwargs) as process:
  56. E   File "/usr/lib/python3.7/subprocess.py", line 775, in __init__
  57. E     restore_signals, start_new_session)
  58. E   File "/usr/lib/python3.7/subprocess.py", line 1453, in _execute_child
  59. E     restore_signals, start_new_session, preexec_fn)
  60. E OSError: [Errno 12] Cannot allocate memory
  61. Init runtime environment failed
复制代码
看报错信息大概是写入权限的问题,Google了一些办法都没有用,希望能得到大家的指导
回复

使用道具 举报

86667780

注册会员

积分
83
沙发
 楼主| 发表于 2020-5-7 15:18:55 | 只看该作者
使用root用户 chown -R xxx:xxx /xxx的命令后,Permission的报错没有了。。。。但是OSError还在。。。。。
回复

使用道具 举报

leok

版主

积分
894
板凳
发表于 2020-5-25 10:07:25 | 只看该作者
86667780 发表于 2020-5-7 15:18
使用root用户 chown -R xxx:xxx /xxx的命令后,Permission的报错没有了。。。。但是OSError还在。。。。。 ...

内存不够?
相信信息再发出来下。
回复

使用道具 举报

Ptolemaeus

中级会员

积分
205
地板
发表于 2021-3-11 15:07:24 | 只看该作者
简化一下模型?
回复

使用道具 举报

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

本版积分规则

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


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