Toybrick

标题: caffe转rknn,模型转成功了,但测试时结果没变化 [打印本页]

作者: 111111    时间: 2020-3-10 18:03
标题: caffe转rknn,模型转成功了,但测试时结果没变化
这是我转模型时打印的信息,请问大神,最后一个警告会影响结果吗?
WARNING: The TensorFlow contrib module will not be included in TensorFlow 2.0.
For more information, please see:
  * https://github.com/tensorflow/co ... 7-contrib-sunset.md
  * https://github.com/tensorflow/addons
If you depend on functionality not listed there, please file an issue.

/home/derron/.local/lib/python3.6/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.  warnings.warn(message)
--> config model
done
--> Loading model
done
--> Building model
W:tensorflow:From /home/derron/.local/lib/python3.6/site-packages/tensorflow/python/ops/control_flow_ops.py:3632: colocate_with (from tensorflow.python.framework.ops) is deprecated and will
be removed in a future version.Instructions for updating:
Colocations handled automatically by placer.
W:tensorflow:From /home/derron/.local/lib/python3.6/site-packages/tensorflow/python/ops/control_flow_ops.py:1941: py_func (from tensorflow.python.ops.script_ops) is deprecated and will be r
emoved in a future version.Instructions for updating:
tf.py_func is deprecated in TF V2. Instead, use
    tf.py_function, which 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.

W Warning: Axis may need to be adjusted according to original model shape.
done
--> Export RKNN model
done

我的代码换了其他模型测试是有结果的,只有这个模型的结果有问题。



作者: jefferyzhang    时间: 2020-3-11 09:31
结果有问题需要调试的,一般思路是把每一层的结果都和原模型对比,找到出问题的那一个op
作者: 111111    时间: 2020-3-11 09:54
jefferyzhang 发表于 2020-3-11 09:31
结果有问题需要调试的,一般思路是把每一层的结果都和原模型对比,找到出问题的那一个op ...

模型可以转成功,但是用c++调用时,无论传什么图片,结果都一样,没有变化过,我现在想确认下模型有没有问题。
作者: 111111    时间: 2020-3-11 09:56
jefferyzhang 发表于 2020-3-11 09:31
结果有问题需要调试的,一般思路是把每一层的结果都和原模型对比,找到出问题的那一个op ...

如果要调试请问怎么操作,我第一次弄这个,可以教下吗
作者: jefferyzhang    时间: 2020-3-11 10:34
111111 发表于 2020-3-11 09:56
如果要调试请问怎么操作,我第一次弄这个,可以教下吗

output一层层往上修改,同样的输入和原模型比对输出。。
都是这么调试的
作者: 111111    时间: 2020-3-11 11:23
jefferyzhang 发表于 2020-3-11 10:34
output一层层往上修改,同样的输入和原模型比对输出。。
都是这么调试的

我刚刚试着把量化关了,结果就对了,可以请教下为什么吗
作者: jefferyzhang    时间: 2020-3-11 11:36
111111 发表于 2020-3-11 11:23
我刚刚试着把量化关了,结果就对了,可以请教下为什么吗

先发下版本:
1. rknn-api
2. rknn-dri
3. rknn-toolkit

然后看下这篇帖子:http://t.rock-chips.com/forum.ph ... &extra=page%3D1

作者: 111111    时间: 2020-3-11 14:04
jefferyzhang 发表于 2020-3-11 11:36
先发下版本:
1. rknn-api
2. rknn-dri

请问怎么看版本
作者: jefferyzhang    时间: 2020-3-11 14:18
111111 发表于 2020-3-11 14:04
请问怎么看版本

运行时候都会打印。建议先通读一遍文档。




欢迎光临 Toybrick (https://t.rock-chips.com/) Powered by Discuz! X3.3