luogen1996 / OneTeacher

GNU General Public License v3.0
78 stars 9 forks source link

train_semi error about student model !!!!! #11

Open meftehs opened 6 months ago

meftehs commented 6 months ago

after resolving all problems about training my custom dataset with One teacher when I launch the training, I got this error:

 Epoch   gpu_mem       box       obj       cls       mls  semi_obj  semi_cls  semi_mls    labelssemi_labels
 0/299     2.68G    0.1051   0.09514   0.01167   0.09257         0         0         0       104         0:  22%|███████▊                            | 3000/13860 [02:58<10:45, 16.81it/s]

Traceback (most recent call last): File "/app/train_semi.py", line 931, in main(opt) File "/app/train_semi.py", line 829, in main train(opt.hyp, opt, device, callbacks) File "/app/train_semi.py", line 510, in train _update_teacher_model(model if ema is None else ema.ema, model_teacher, word_size=WORLD_SIZE, keep_rate=0.) File "/opt/conda/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) File "/app/utils/torch_utils.py", line 48, in _update_teacher_model raise Exception("{} is not found in student model".format(key)) Exception: model.0.conv.conv.weight is not found in student model

How could I resolve it ?

July-1024 commented 4 months ago

I met the same problem,how did you solve it?