RK3399Pro tensorflow模型转rknn模型失败



发表于 2021-10-18 11:40:07    查看: 1289|回复: 1 | [复制链接]    打印 | 显示全部楼层
tensorflow模型转化为rknn模型失败  下面是代码部分,各位帮忙看一下

(venv) ljs@ljs-virtual-machine:~/yolov3_demo$ python3
--> Loading model
W:tensorflow:From /home/ljs/venv/lib/python3.6/site-packages/rknn/api/ The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.

W:tensorflow:From /home/ljs/venv/lib/python3.6/site-packages/rknn/api/ The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.

2021-10-18 10:35:19.926517: E tensorflow/stream_executor/cuda/] failed call to cuInit: UNKNOWN ERROR (303)
W:tensorflow:From /home/ljs/venv/lib/python3.6/site-packages/rknn/api/ The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.

--> Building model
W The RKNN Model generated can not run on simulator when pre_compile is True.
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/ljs/venv/lib/python3.6/site-packages/rknn/api/ The name tf.reset_default_graph is deprecated. Please use tf.compat.v1.reset_default_graph instead.

W:tensorflow:From /home/ljs/venv/lib/python3.6/site-packages/rknn/api/ The name tf.FIFOQueue is deprecated. Please use tf.queue.FIFOQueue instead.

W:tensorflow:From /home/ljs/venv/lib/python3.6/site-packages/tensorflow/python/ops/ 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.
2021-10-18 10:38:41.894117: W tensorflow/compiler/jit/] (One-time warning): Not using XLA:CPU for cluster because envvar TF_XLA_FLAGS=--tf_xla_cpu_global_jit was not set.  If you want XLA:CPU, either set that envvar, or use experimental_jit_scope to enable XLA:CPU.  To confirm that XLA is active, pass --vmodule=xla_compilation_cache=1 (as a proper command-line flag, not via TF_XLA_FLAGS) or set the envvar XLA_FLAGS=--xla_hlo_profile.
/bin/sh: 1: make: not found
/bin/sh: 1: /tmp/tmp1shhxcwp/gen_nbg: not found
mv: 无法获取'/home/ljs/yolov3_demo/*.nb' 的文件状态(stat): 没有那个文件或目录
mv: 无法获取'/home/ljs/yolov3_demo/*.dat' 的文件状态(stat): 没有那个文件或目录
E Generate nbg failed.
W ----------------Warning(3)----------------
E Catch exception when building RKNN model!
E Traceback (most recent call last):
E   File "rknn/base/", line 193, in rknn.base.ovxconfiggenerator.generate_vx_config_from_files
E   File "rknn/base/RKNNlib/app/exporter/ovxlib_case/", line 632, in
E   File "rknn/base/RKNNlib/app/exporter/ovxlib_case/", line 583, in
E   File "rknn/base/RKNNlib/app/exporter/ovxlib_case/", line 548, in
E AttributeError: 'CaseGenerator' object has no attribute 'nbg_graph_file_path'
E During handling of the above exception, another exception occurred:
E Traceback (most recent call last):
E   File "rknn/api/", line 601, in
E   File "rknn/api/", line 414, in rknn.api.rknn_base.RKNNBase._build
E   File "rknn/base/", line 195, in rknn.base.ovxconfiggenerator.generate_vx_config_from_files
E   File "rknn/api/", line 312, in rknn.api.rknn_log.RKNNLog.e
E ValueError: Generate nbg failed.
E RKNN model data is None, please load model first!
E RKNN model data is None, please load model first!


使用道具 举报



发表于 2021-10-29 10:58:05 | 显示全部楼层

使用道具 举报

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


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

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