yolov5-face-landmarks-opencv-v2
yolov5-face-landmarks-opencv-v2 copied to clipboard
error when convert to onnx
i run main_export_onnx.py in python3 and it show error
File "main_export_onnx.py", line 89, in forward x[0] = x[0].view(-1, self.no) TypeError: 'tuple' object does not support item assignment
how can i fix this?
i run main_export_onnx.py in python3 and it show error
File "main_export_onnx.py", line 89, in forward x[0] = x[0].view(-1, self.no) TypeError: 'tuple' object does not support item assignment
how can i fix this?
你好 我也遇到这种得问题 请问你解决了吗
I solved this issue. at line 89 insert :
x = x[1]
x is a list and it's second element is the one containing the triple <class 'torch.Tensor'> it will be ok
Updates.
After this bug fixed, the ONNX file is located in the directory precise in the main_extraction code file.
Updates.
After this bug fixed, the ONNX file is located in the directory precise in the main_extraction code file.
Thank you
Updates.
After this bug fixed, the ONNX file is located in the directory precise in the main_extraction code file.
Hi i have other problems,at line 89 inset x=x[1] but have other problems:

i also delete line 90 and line 91, also have problems ,so You can show me your code? thank you
What's the error you have ?
On Sat, Jun 25, 2022, 09:46 zdl @.***> wrote:
Updates.
After this bug fixed, the ONNX file is located in the directory precise in the main_extraction code file.
Hi i have other problems,at line 89 inset x=x[1] but have other problems: [image: image] https://user-images.githubusercontent.com/46549527/175765780-45b15813-e956-4757-9e30-9a9d6bca5261.png
i also delete line 90 and line 91, also have problems ,so You can show me your code? thank you
— Reply to this email directly, view it on GitHub https://github.com/hpc203/yolov5-face-landmarks-opencv-v2/issues/7#issuecomment-1166230583, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUUSCLIBC37UPMZKVSHDFZ3VQ3BPZANCNFSM5SITAOGA . You are receiving this because you commented.Message ID: @.***>
What's the error you have ? … On Sat, Jun 25, 2022, 09:46 zdl @.> wrote: Updates. After this bug fixed, the ONNX file is located in the directory precise in the main_extraction code file. Hi i have other problems,at line 89 inset x=x[1] but have other problems: [image: image] https://user-images.githubusercontent.com/46549527/175765780-45b15813-e956-4757-9e30-9a9d6bca5261.png i also delete line 90 and line 91, also have problems ,so You can show me your code? thank you — Reply to this email directly, view it on GitHub <#7 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUUSCLIBC37UPMZKVSHDFZ3VQ3BPZANCNFSM5SITAOGA . You are receiving this because you commented.Message ID: @.>

Seems you deleted a line of code. x[0] = x[0].view(-1, self.no)
It should look like :
x = x[1]
x[0] = x[0].view(-1, self.no)
x[1] = x[1].view(-1, self.no)
x[2] = x[2].view(-1, self.no)
What do you have ?
Seems you deleted a line of code.
x[0] = x[0].view(-1, self.no)It should look like :x = x[1]x[0] = x[0].view(-1, self.no)x[1] = x[1].view(-1, self.no)x[2] = x[2].view(-1, self.no)What do you have ?
thank you very much!! add x = x[1], The problem goes away!!!
Oh yeah ! (◠‿◕)
I think the issue can be closed
On Wed, Jun 29, 2022, 7:09 AM zdl @.***> wrote:
Seems you deleted a line of code. x[0] = x[0].view(-1, self.no) It should look like : x = x[1] x[0] = x[0].view(-1, self.no) x[1] = x[1].view(-1, self.no) x[2] = x[2].view(-1, self.no)
What do you have ?
thank you very much!! add x = x[1], The problem goes away!!!
— Reply to this email directly, view it on GitHub https://github.com/hpc203/yolov5-face-landmarks-opencv-v2/issues/7#issuecomment-1169572332, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUUSCLMM5UUFZ77KUJ6KX4LVRPSCVANCNFSM5SITAOGA . You are receiving this because you commented.Message ID: @.***>