Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input channel 1 less then 3, please update NPU Driver to v1.3.0 or later. #472

Open
prfans opened this issue Sep 12, 2024 · 1 comment
Open

Comments

@prfans
Copy link

prfans commented Sep 12, 2024

同样的模型,input channel==1转换失败,input channel==3转换成功。失败信息:

D:\Users\xxxxx\Miniconda3\envs\rknn_v1.75\lib\site-packages\numpy_distributor_init.py:32: UserWarning: loaded more than 1 DLL from .libs:
D:\Users\xxxxx\Miniconda3\envs\rknn_v1.75\lib\site-packages\numpy.libs\libopenblas.TXA6YQSD3GCQQC22GEQ54J2UDCXDXHWN.gfortran-win_amd64.dll
D:\Users\xxxxx\Miniconda3\envs\rknn_v1.75\lib\site-packages\numpy.libs\libopenblas.WCDJNK7YVMPZQ2ME2ZZHJJRJ3JIKNDB7.gfortran-win_amd64.dll
stacklevel=1)
W rknn-toolkit version: 1.7.5
W Detect torchvision(0.11.0). If the python program got segment fault error, try to before
D:\Users\xxxxx\Miniconda3\envs\rknn_v1.75\lib\site-packages\tensorflow\python\framework\dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
D:\Users\xxxxx\Miniconda3\envs\rknn_v1.75\lib\site-packages\tensorflow\python\framework\dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
D:\Users\xxxxx\Miniconda3\envs\rknn_v1.75\lib\site-packages\tensorflow\python\framework\dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
D:\Users\xxxxx\Miniconda3\envs\rknn_v1.75\lib\site-packages\tensorflow\python\framework\dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
D:\Users\xxxxx\Miniconda3\envs\rknn_v1.75\lib\site-packages\tensorflow\python\framework\dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
D:\Users\xxxxx\Miniconda3\envs\rknn_v1.75\lib\site-packages\tensorflow\python\framework\dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
D:\Users\xxxxx\Miniconda3\envs\rknn_v1.75\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
D:\Users\xxxxx\Miniconda3\envs\rknn_v1.75\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
D:\Users\xxxxx\Miniconda3\envs\rknn_v1.75\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
D:\Users\xxxxx\Miniconda3\envs\rknn_v1.75\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
D:\Users\xxxxx\Miniconda3\envs\rknn_v1.75\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
D:\Users\xxxxx\Miniconda3\envs\rknn_v1.75\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
--> Config model
done
--> Loading model
W The config.mean_values is None, zeros will be set for input 0!
W The config.std_values is None, ones will be set for input 0!
W base_optimize check ...
W "output": cosine = 1.0, euclidean = 0.0
W correct_ops check ...
W Catch exception when optimize onnx model, skip it! Exception: [ONNXRuntimeError] : 10 : INVALID_GRAPH : This is an invalid model. Type Error: Type 'tensor(int32)' of input parameter (645) of operator (Reshape) in node (Reshape_183) is invalid.
W Input channel 1 less then 3, please update NPU Driver to v1.3.0 or later.
W:tensorflow:From D:\Users\xxxxx\Miniconda3\envs\rknn_v1.75\lib\site-packages\rknn\api\rknn.py:160: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.

W:tensorflow:From D:\Users\xxxxx\Miniconda3\envs\rknn_v1.75\lib\site-packages\rknn\api\rknn.py:160: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.

W:tensorflow:From D:\Users\xxxxx\Miniconda3\envs\rknn_v1.75\lib\site-packages\rknn\api\rknn.py:160: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.

done
--> Building model
W:tensorflow:From D:\Users\xxxxx\Miniconda3\envs\rknn_v1.75\lib\site-packages\rknn\api\rknn.py:291: The name tf.reset_default_graph is deprecated. Please use tf.compat.v1.reset_default_graph instead.

W:tensorflow:From D:\Users\xxxxx\Miniconda3\envs\rknn_v1.75\lib\site-packages\rknn\api\rknn.py:291: The name tf.FIFOQueue is deprecated. Please use tf.queue.FIFOQueue instead.

W:tensorflow:From D:\Users\xxxxx\Miniconda3\envs\rknn_v1.75\lib\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.
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_functions 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 D:\Users\xxxxx\Miniconda3\envs\rknn_v1.75\lib\site-packages\rknn\api\rknn.py:291: The name tf.nn.max_pool is deprecated. Please use tf.nn.max_pool2d instead.

W Invalid format detected in the input file "./dataset.txt", exiting.
E Catch exception when building RKNN model!
E Traceback (most recent call last):
E File "D:\Users\xxxxx\Miniconda3\envs\rknn_v1.75\lib\site-packages\tensorflow\python\client\session.py", line 1356, in _do_call
E return fn(*args)
E File "D:\Users\xxxxx\Miniconda3\envs\rknn_v1.75\lib\site-packages\tensorflow\python\client\session.py", line 1341, in _run_fn
E options, feed_dict, fetch_list, target_list, run_metadata)
E File "D:\Users\xxxxx\Miniconda3\envs\rknn_v1.75\lib\site-packages\tensorflow\python\client\session.py", line 1429, in _call_tf_sessionrun
E run_metadata)
E tensorflow.python.framework.errors_impl.OutOfRangeError: FIFOQueue '_0_fifo_queue' is closed and has insufficient elements (requested 1, current size 0)
E [[{{node fifo_queue_Dequeue}}]]
E During handling of the above exception, another exception occurred:
E Traceback (most recent call last):
E File "rknn\base\RKNNlib\RKNN_session.py", line 37, in rknn.base.RKNNlib.RKNN_session.RKNNSession.run
E File "D:\Users\xxxxx\Miniconda3\envs\rknn_v1.75\lib\site-packages\tensorflow\python\client\session.py", line 950, in run
E run_metadata_ptr)
E File "D:\Users\xxxxx\Miniconda3\envs\rknn_v1.75\lib\site-packages\tensorflow\python\client\session.py", line 1173, in _run
E feed_dict_tensor, options, run_metadata)
E File "D:\Users\xxxxx\Miniconda3\envs\rknn_v1.75\lib\site-packages\tensorflow\python\client\session.py", line 1350, in _do_run
E run_metadata)
E File "D:\Users\xxxxx\Miniconda3\envs\rknn_v1.75\lib\site-packages\tensorflow\python\client\session.py", line 1370, in _do_call
E raise type(e)(node_def, op, message)
E tensorflow.python.framework.errors_impl.OutOfRangeError: FIFOQueue '_0_fifo_queue' is closed and has insufficient elements (requested 1, current size 0)
E [[node fifo_queue_Dequeue (defined at D:\Users\xxxxx\Miniconda3\envs\rknn_v1.75\lib\site-packages\rknn\api\rknn.py:291) ]]
E Original stack trace for 'fifo_queue_Dequeue':
E File "convert_yolox.py", line 241, in
E ret = rknn.build(do_quantization=QUANTIZE_ON, dataset='./dataset.txt',)
E File "D:\Users\xxxxx\Miniconda3\envs\rknn_v1.75\lib\site-packages\rknn\api\rknn.py", line 291, in build
E batch_size=rknn_batch_size)
E File "D:\Users\xxxxx\Miniconda3\envs\rknn_v1.75\lib\site-packages\tensorflow\python\ops\data_flow_ops.py", line 445, in dequeue
E self._queue_ref, self._dtypes, name=name)
E File "D:\Users\xxxxx\Miniconda3\envs\rknn_v1.75\lib\site-packages\tensorflow\python\ops\gen_data_flow_ops.py", line 4502, in queue_dequeue_v2
E timeout_ms=timeout_ms, name=name)
E File "D:\Users\xxxxx\Miniconda3\envs\rknn_v1.75\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 788, in _apply_op_helper
E op_def=op_def)
E File "D:\Users\xxxxx\Miniconda3\envs\rknn_v1.75\lib\site-packages\tensorflow\python\util\deprecation.py", line 507, in new_func
E return func(*args, **kwargs)
E File "D:\Users\xxxxx\Miniconda3\envs\rknn_v1.75\lib\site-packages\tensorflow\python\framework\ops.py", line 3616, in create_op
E op_def=op_def)
E File "D:\Users\xxxxx\Miniconda3\envs\rknn_v1.75\lib\site-packages\tensorflow\python\framework\ops.py", line 2005, in init
E self._traceback = tf_stack.extract_stack()
E Please feedback the detailed log file <log_feedback_to_the_rknn_toolkit_dev_team.log> to the RKNN Toolkit development team.
E You can also check github issues: https://github.com/rockchip-linux/rknn-toolkit/issues

@prfans
Copy link
Author

prfans commented Sep 12, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant