BICLab / EMS-YOLO

Offical implementation of "Deep Directly-Trained Spiking Neural Networks for Object Detection" (ICCV2023)
https://arxiv.org/abs/2307.11411
GNU General Public License v3.0
150 stars 14 forks source link

RuntimeError: Given groups=1, weight of size [3, 32, 2, 2], expected input[1, 3, 256, 256] to have 32 channels, but got 3 channels instead #9

Open 108360215 opened 9 months ago

108360215 commented 9 months ago

My data is Gen1 data, I use command: "python train_g1.py", and I need help to solve this. could everyone help me. Thanks!

HouNic97 commented 9 months ago

My data is Gen1 data, I use command: "python train_g1.py", and I need help to solve this. could everyone help me. Thanks!

Hi bro,have you already solved Problem“Train_g1.py has no dataset about .txt” AND HOW?

108360215 commented 9 months ago

@HouNic97 I replace datasets_g1T.py with give_g1_data.py(LoadImagesAndLabels). But I still can't implement train_g1.py.

HouNic97 commented 9 months ago

@HouNic97 I replace datasets_g1T.py with give_g1_data.py(LoadImagesAndLabels). But I still can't implement train_g1.py.

Q

Thank you for your response. I don't quite understand the settings for these three paths. How did you set them, and where do I need to set them?(give_g1_data.py : line 410 ,line 440 and line 441)

108360215 commented 9 months ago

@HouNic97 Hi, I also try to figure out this source code. I am still not implementing on train_g1.py, if you work successfully pls tell me. Thanks.

108360215 commented 8 months ago

@HouNic97 I know these path should be your gen1 data file path

ooYwY commented 6 months ago

请问这个问题解决了吗 该怎么解决呢

sumingming123 commented 1 month ago

Have you encountered this problem? I have agreed to the time_window setting parameters. This error is still displayed.Starting training for 250 epochs...

Epoch gpu_mem box obj cls labels img_size 0%| | 0/1 [00:00<?, ?it/s] /content/drive/MyDrive/EMS_YOLO_LU/g1_resnet/train_g1.py:343: FutureWarning: torch.cuda.amp.autocast(args...) is deprecated. Please use torch.amp.autocast('cuda', args...) instead. with amp.autocast(enabled=cuda): 0%| | 0/1 [00:00<?, ?it/s] Traceback (most recent call last): File "/content/drive/MyDrive/EMS_YOLO_LU/g1_resnet/train_g1.py", line 662, in main(opt) File "/content/drive/MyDrive/EMS_YOLO_LU/g1_resnet/train_g1.py", line 559, in main train(opt.hyp, opt, device, callbacks) File "/content/drive/MyDrive/EMS_YOLO_LU/g1_resnet/train_g1.py", line 344, in train pred = model(imgs) # forward File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl return self._call_impl(*args, *kwargs) File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1747, in _call_impl return forward_call(args, **kwargs) File "/content/drive/MyDrive/EMS_YOLO_LU/models/yolo.py", line 140, in forward input[i] = x RuntimeError: expand(torch.FloatTensor{[47, 5, 3, 320, 320]}, size=[47, 5, 3, 320]): the number of sizes provided (4) must be greater or equal to the number of dimensions in the tensor (5)