-
Notifications
You must be signed in to change notification settings - Fork 58
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
question about ann_to_snn generating snn_dag #38
Comments
@shirleyatgithub $ python ann_to_snn.py --cfg cfg/yolov3-tiny.cfg --data data/coco.data --weights weights/best.pt --timesteps 128 I encountered this problem: "ValueError: ('cannot find tensor Size', torch.Size([16, 16, 320, 320])) " |
@buaa-luzhi yes, seems the same problem, I use torch 1.7.1. any idea of solving this problem? |
@shirleyatgithub |
@buaa-luzhi why using pytorch=1.3, the requirements.txt suggests torch>=1.6.0 |
@shirleyatgithub |
@shirleyatgithub |
@buaa-luzhi I didn't find torch 1.3 either so I tried torch 1.4 cpu and python 3.7, this problem is didn't pop out but another problem pops out. |
@shirleyatgithub |
@shirleyatgithub |
@shirleyatgithub |
Thank you, I will try too |
Please use pytorch1.3 with python 3.7 in this version. |
@cwq159 @shirleyatgithub |
@cwq159 @shirleyatgithub What's wrong with this type of training? Thanks so much, and looking forward to your reply! |
Now that error doesn't exist. |
@cwq159 |
If you want to enlarge timesteps, you should use one GPU with enough memory. |
@cwq159 |
RTX8000 with 48G memory |
thanks! That is great! how long it will take about the new code? |
@buaa-luzhi Execuse me, how do you solve this error: ValueError: ('cannot find tensor Size', torch.Size([16, 16, 640, 640])) |
@buaa-luzhi ValueError: ('找不到张量大小', torch.Size([16, 16, 640, 640]))hello,how did you solved this question?can you tell me? |
Sorry actually i have no idea about it.
发自我的iPhone
…------------------ Original ------------------
From: jsckdon ***@***.***>
Date: Thu,Apr 25,2024 7:12 PM
To: cwq159/PyTorch-Spiking-YOLOv3 ***@***.***>
Cc: mengjingyouling ***@***.***>, Comment ***@***.***>
Subject: Re: [cwq159/PyTorch-Spiking-YOLOv3] question about ann_to_snngenerating snn_dag (Issue #38)
@buaa-luzhi ValueError: ('找不到张量大小', torch.Size([16, 16, 640, 640]))hello,how did you solved this question?can you tell me?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
This code ann-snn still have some problems?Today I try to run this code and i meet this problem ,i see someone request to use python3.7 and torch 1.3,i don't konw this wether useful |
You can try it
发自我的iPhone
…------------------ Original ------------------
From: jsckdon ***@***.***>
Date: Thu,Apr 25,2024 7:47 PM
To: cwq159/PyTorch-Spiking-YOLOv3 ***@***.***>
Cc: mengjingyouling ***@***.***>, Comment ***@***.***>
Subject: Re: [cwq159/PyTorch-Spiking-YOLOv3] question about ann_to_snngenerating snn_dag (Issue #38)
Sorry actually i have no idea about it. 发自我的iPhone
…
------------------ Original ------------------ From: jsckdon @.> Date: Thu,Apr 25,2024 7:12 PM To: cwq159/PyTorch-Spiking-YOLOv3 @.> Cc: mengjingyouling @.>, Comment @.> Subject: Re: [cwq159/PyTorch-Spiking-YOLOv3] question about ann_to_snngenerating snn_dag (Issue #38) @buaa-luzhi ValueError: ('找不到张量大小', torch.Size([16, 16, 640, 640]))hello,how did you solved this question?can you tell me? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
This code ann-snn still have some problems?Today I try to run this code and i meet this problem ,i see someone request to use python3.7 and torch 1.3,i don't konw this wether useful
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
Dear Author,
Thanks for sharing the code. I encountered a problem when executing the ann_to_snn.py and wonder if you have encountered this problem.
The error message is as follows:
"
File "/home/gss/PyTorch-Spiking-YOLOv3-main/ann_parser.py", line 102, in relu_wrapper
in_nodes = [find_node_by_tensor(inp)]
File "/home/gss/PyTorch-Spiking-YOLOv3-main/ann_parser.py", line 37, in find_node_by_tensor
raise ValueError("cannot find tensor Size", tensor.size())
ValueError: ('cannot find tensor Size', torch.Size([1, 16, 416, 416]))
"
In ann_parser.py, the find_node_by_tensor requires "v is tensor", in python this means their memory are the same, but when adding ReLU layer, the input of ReLU cannot meet this condition and the rst is empty.
I print the id of the tensors in this function and got the following messages:
conv1 inp id 140221914107048
find node by tensor dag_input0 torch.Size([1, 3, 416, 416]) torch.Size([1, 3, 416, 416]) 140221914107048 140221914107048
add node conv1: ['dag_input0']->['conv1_out1']
conv1 out id 140221914107336
find node by tensor dag_input0 torch.Size([1, 16, 416, 416]) torch.Size([1, 3, 416, 416]) 140221914107336 140221914107048
find node by tensor conv1_out1 torch.Size([1, 16, 416, 416]) torch.Size([1, 16, 416, 416]) 140221914107336 140221914107336
batch_norm1 inp id 140221914107336
batch_norm1 out id 140221914155120
relu1 inp id 140221914106976
find node by tensor dag_input0 torch.Size([1, 16, 416, 416]) torch.Size([1, 3, 416, 416]) 140221914106976 140221914107048
find node by tensor conv1_out1 torch.Size([1, 16, 416, 416]) torch.Size([1, 16, 416, 416]) 140221914106976 140221914155120
I don't understand why the id will be different in the flow. I only change the classses from 80 to 1 and the filters from 255 to 18 accordingly in the config file "yolov3-tiny-mp2conv-mp1none-lk2relu-up2tconv.cfg". The ANN trained with the config file can be trained and tested successfully.
Looking forward to your reply. @cwq159
The text was updated successfully, but these errors were encountered: