Closed yian2271368 closed 4 years ago
@yian2271368 Yes, we resize the image to the same scale for training.
@layumi thanks for replying. I did the same thing, i resized the image to 256*128, but the images just look strange. I guess i will just see how the model work. Thanks for you help!
@layumi hey, sorry to bother you again. I tried to train the teacher model bymyself, following the instructions from another repo. I resized the Images by scales(so they can keep the same height-width ratio), and then pad them to 256*256. The thing is, the PCB model did not converge(I trained 120 epochs, loss keeps around 41). The only thing i changed was that i Put scheduler.step() after optimizer.step(). Do you have any idea about this? here is the train config: python train.py --gpu_ids 0 --name MSMT17_ft_ResNet50 --train_all --batchsize 32 --PCB torchvision is 1.4.0 python version is 3.7
Hi @yian2271368 You may consider to tune down the learning rate.
@layumi hey, i have tried differnet learning rates, i guess it's not the problem of learning rates. train loss did not change much since the first epoch
@yian2271368 Have you tried to use the same setting on Market?
@layumi yes, the setting is the same, except the learning rate and image size.
i solved the problem. the issued caused because i put Scheduler.step() after optimizer.step(). ps: that's what new version pytorch told me to do. but this might cause gradient did not update(i don't know how and why this happened yet). thus, i put scheduler.step back, and everything works.
hi guys, thanks for your greate contributions. I am just curious while you do the supervised learning for MSMT17 datasets, did you reisze the images to the same size?(since the shape of the images vary in that dataset). If not, how did you deal with that?