Toybrick

楼主: jax.fang

人工智能开发系列(8) 表情识别

ziyifly

新手上路

积分
41
楼主
发表于 2022-10-20 20:44:45 | 显示全部楼层
你好,请问TensorFlow的版本和keras的版本分别应该多少呢? 既然是官方推荐的帖子,希望能描述详细一些帮到我们
我现在用的是官方1.4.0的docker,rknn-toolkit2-1.40,TensorFlow和Keras 两个版本都是 2.6.2 ,但转换模型时提示:

  1. root@2c548c52c948:/rknn_test# python3 rknn_transfer.py
  2. 2022-10-20 20:42:44.727550: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory
  3. 2022-10-20 20:42:44.727594: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
  4. /usr/local/lib/python3.8/dist-packages/keras/backend.py:401: UserWarning: `tf.keras.backend.set_learning_phase` is deprecated and will be removed after 2020-10-11. To update it, simply pass a True/False value to the `training` argument of the `__call__` method of your layer or model.
  5.   warnings.warn('`tf.keras.backend.set_learning_phase` is deprecated and '
  6. 2022-10-20 20:42:45.534988: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory
  7. 2022-10-20 20:42:45.535040: W tensorflow/stream_executor/cuda/cuda_driver.cc:269] failed call to cuInit: UNKNOWN ERROR (303)
  8. 2022-10-20 20:42:45.535060: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (2c548c52c948): /proc/driver/nvidia/version does not exist
  9. 2022-10-20 20:42:45.535192: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 FMA
  10. To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
  11. W:tensorflow:Error in loading the saved optimizer state. As a result, your model is starting with a freshly initialized optimizer.
  12. input is : input_1
  13. output is: predictions/Softmax:0
  14. Traceback (most recent call last):
  15.   File "rknn_transfer.py", line 124, in <module>
  16.     pb_transfer()
  17.   File "rknn_transfer.py", line 62, in pb_transfer
  18.     frozen_graph = freeze_session(K.get_session(), output_names=[net_model.output.op.name])
  19.   File "/usr/local/lib/python3.8/dist-packages/keras/engine/keras_tensor.py", line 222, in op
  20.     raise TypeError('Keras symbolic inputs/outputs do not '
  21. TypeError: Keras symbolic inputs/outputs do not implement `op`. You may be trying to pass Keras symbolic inputs/outputs to a TF API that does not register dispatching, preventing Keras from automatically converting the API call to a lambda layer in the Functional Model.
  22. root@2c548c52c948:/rknn_test#
复制代码

回复

使用道具 举报

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

本版积分规则

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


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