Closed shirleyatgithub closed 3 years ago
font{
line-height: 1.6;
}
ul,ol{
padding-left: 20px;
list-style-position: inside;
}
Dear Shirley,You can try to adjust some hyperparameters for your own situation. By the way, the accuracy is very sensitive to ’timesteps’. I suggest you to enlarge it (with --timesteps or -T).
Best wishes,Weiqian Chen
Weiqian Chen
cwq@pku.edu.cn
签名由
网易邮箱大师
定制
On 11/18/2020 20:25,shirleyatgithub<notifications@github.com> wrote:
Dear Author, Thanks for sharing the code. I have tried to run the project and have proceeded to the ann_to_snn.py step. I train the spiking-yolo-tiny-v2 on my own dataset and got the ann mAP of 0.969. but the snn mAP is 0. I am very confused. Do you have any idea why this happens? The output of the ann_to_snn.py is as follows. I appreciate your reply. Best regards, Shirley $: python ann_to_snn.py --model_def config/spiking-yolov3-tiny-v2-poker.cfg --weights_path checkpoints/spiking_yolov3_ckpt_49.pth --data_config data/poker.data --save_file poker_snn_new.pth Compute ann_mAP... Detecting objects: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████| 17/17 [00:01<00:00, 10.76it/s] Computing AP: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:00<00:00, 620.09it/s] ANN Average Precisions:
Class '0' (jokera) - AP: 0.9469341904820117 Class '1' (flower) - AP: 1.0 Class '2' (peach) - AP: 0.961223754908887 ann_mAP: 0.9693859817969662 add node conv1: ['dag_input0']->['conv1_out1'] add node relu1: ['conv1_out1']->['relu1_out1'] add node conv2: ['relu1_out1']->['conv2_out1'] add node relu2: ['conv2_out1']->['relu2_out1'] add node conv3: ['relu2_out1']->['conv3_out1'] add node relu3: ['conv3_out1']->['relu3_out1'] add node conv4: ['relu3_out1']->['conv4_out1'] add node relu4: ['conv4_out1']->['relu4_out1'] add node conv5: ['relu4_out1']->['conv5_out1'] add node relu5: ['conv5_out1']->['relu5_out1'] add node conv6: ['relu5_out1']->['conv6_out1'] add node relu6: ['conv6_out1']->['relu6_out1'] add node conv7: ['relu6_out1']->['conv7_out1'] add node relu7: ['conv7_out1']->['relu7_out1'] add node conv8: ['relu7_out1']->['conv8_out1'] add node relu8: ['conv8_out1']->['relu8_out1'] add node conv9: ['relu8_out1']->['conv9_out1'] add node relu9: ['conv9_out1']->['relu9_out1'] add node conv10: ['relu9_out1']->['conv10_out1'] add node relu10: ['conv10_out1']->['relu10_out1'] add node conv11: ['relu10_out1']->['conv11_out1'] add node relu11: ['conv11_out1']->['relu11_out1'] add node conv12: ['relu11_out1']->['conv12_out1'] add node relu12: ['conv12_out1']->['relu12_out1'] add node conv13: ['relu12_out1']->['conv13_out1'] add node relu13: ['conv13_out1']->['relu13_out1'] add node conv14: ['relu13_out1']->['conv14_out1'] add node relu14: ['conv14_out1']->['relu14_out1'] add node conv15: ['relu13_out1']->['conv15_out1'] add node relu15: ['conv15_out1']->['relu15_out1'] add node conv_transpose2d1: ['relu15_out1']->['conv_transpose2d1_out1'] add node relu16: ['conv_transpose2d1_out1']->['relu16_out1'] <class 'ann_parser.WrappedTensor'> add node concat1: ['relu16_out1', 'relu9_out1']->['concat1_out1'] add node conv16: ['concat1_out1']->['conv16_out1'] add node relu17: ['conv16_out1']->['relu17_out1'] ['relu14_out1', 'relu17_out1'] Fuse the weights in conv1 Fuse the weights in conv2 ... Fuse the weights in conv14 Fuse the weights in conv15 Fuse the weights in conv_transpose2d1 Fuse the weights in conv16 processing layer conv1 set conv1: Vthr tensor([1.], device='cuda:0') processing layer conv2 set conv2: Vthr tensor([1.], device='cuda:0') processing layer conv3 ... set conv14: Vthr tensor([1.], device='cuda:0') processing layer conv15 set conv15: Vthr tensor([1.], device='cuda:0') processing layer conv_transpose2d1 set conv_transpose2d1: Vthr tensor([1.], device='cuda:0') processing layer conv16 set conv16: Vthr tensor([1.], device='cuda:0') Transfer ANN to SNN Finished Compute snn_mAP... Detecting objects: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████| 17/17 [01:21<00:00, 4.79s/it] Mean Firing ratios 0.035930052454419, Firing ratios: [0.03566576 0.05829677 0.03234111 0.03301278 0.02452508 0.01966095 0.02999737 0.02216655 0.04191801 0.01632895 0.04303824 0.03995884 0.03717795 0.05171612 0.04920398 0.04772826 0.04385476 0.02014944] Computing AP: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:00<00:00, 7.58it/s] SNN Average Precisions: Class '0' (jokera) - snn_AP: 0.0 Class '1' (flower) - snn_AP: 0.0 Class '2' (peach) - snn_AP: 0.0 snn_mAP: 0.0 Save the SNN in poker_snn_new.pth
—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or unsubscribe.
Thanks for your reply. it works!
@shirleyatgithub
Hello, Which version of PyTorch are you using?
Thanks so much!
Dear Author, Thanks for sharing the code. I have tried to run the project and have proceeded to the ann_to_snn.py step. I train the spiking-yolo-tiny-v2 on my own dataset and got the ann mAP of 0.969. but the snn mAP is 0. I am very confused. Do you have any idea why this happens? The output of the ann_to_snn.py is as follows. I appreciate your reply. Best regards, Shirley
$: python ann_to_snn.py --model_def config/spiking-yolov3-tiny-v2-poker.cfg --weights_path checkpoints/spiking_yolov3_ckpt_49.pth --data_config data/poker.data --save_file poker_snn_new.pth Compute ann_mAP... Detecting objects: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████| 17/17 [00:01<00:00, 10.76it/s] Computing AP: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:00<00:00, 620.09it/s] ANN Average Precisions: