PaddlePaddle / PaddleX

PaddlePaddle End-to-End Development Toolkit(飞桨低代码开发工具)
Apache License 2.0
4.6k stars 906 forks source link

用PaddleX转化模型的时候遇到了警告信息,没有报错,但是结果也没有生成 #1697

Closed sanersbug closed 1 year ago

sanersbug commented 1 year ago

环境: 1.paddlepaddle-gpu 2.4.2.post116 paddle2onnx 1.0.6 2.Windows10 3.Python 3.10.6 4.CUDA 11.6 CUDNN 8.2

下面是模型转化的时候遇到的问题:

G:\Github\loftr\src\loftr\loftr.py:55: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs! if data['hw0_i'] == data['hw1_i']: # faster & better BN convergence G:\Github\loftr\src\loftr\loftr_module\transformer.py:89: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs! assert self.d_model == feat0.size(2), "the feature number of src and transformer must be equal" F:\Anaconda3\envs\paddle\lib\site-packages\opt_einsum\contract.py:231: TracerWarning: Converting a tensor to a Python integer might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs! dim = int(sh[cnum]) F:\Anaconda3\envs\paddle\lib\site-packages\opt_einsum\parser.py:155: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs! max(shape[loc] for shape, loc in zip(shapes, [x.find(c) for x in inputs]) if loc >= 0) for c in output) F:\Anaconda3\envs\paddle\lib\site-packages\einops\einops.py:316: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs! known: Set[str] = {axis for axis in composite_axis if axis_name2known_length[axis] != _unknown_axis_length} F:\Anaconda3\envs\paddle\lib\site-packages\einops\einops.py:317: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs! unknown: Set[str] = {axis for axis in composite_axis if axis_name2known_length[axis] == _unknown_axis_length} G:\Github\loftr\src\loftr\loftr_module\fine_preprocess.py:35: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs! if data['b_ids'].shape[0] == 0: G:\Github\loftr\src\loftr\loftr.py:81: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs! if feat_f0_unfold.size(0) != 0: # at least one coarse level predicted G:\Github\loftr\src\loftr\utils\fine_matching.py:28: TracerWarning: Converting a tensor to a Python float might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs! W = int(math.sqrt(WW)) G:\Github\loftr\src\loftr\utils\fine_matching.py:33: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs! if M == 0: G:\Github\loftr\src\loftr\utils\fine_matching.py:66: TracerWarning: Using len to get tensor shape might cause the trace to be incorrect. Recommended usage would be tensor.shape[0]. Passing a tensor of different shape might lead to errors or silently give incorrect results. mkpts1_f = data['mkpts1_c'] + (coords_normed (W // 2) scale1)[:len(data['mconf'])] The traced function didn't return any values! Side-effects are not captured in traces, so it would be a no-op.

sanersbug commented 1 year ago

抱歉,跑错地方了。。。