JDAI-CV / FaceX-Zoo

A PyTorch Toolbox for Face Recognition
https://arxiv.org/pdf/2101.04407.pdf
Other
1.85k stars 433 forks source link

semi-siamese_training #81

Open YjDai opened 3 years ago

YjDai commented 3 years ago

遇到一个问题 INFO 2021-06-04 19:48:13 train.py: 101] Epoch 0, iter 0, lr 0.100000, loss 9.736826 INFO 2021-06-04 19:50:31 train.py: 101] Epoch 0, iter 100, lr 0.100000, loss 19.080706

INFO 2021-06-04 19:52:51 train.py: 101] Epoch 0, iter 200, lr 0.100000, loss 18.547696 INFO 2021-06-04 19:55:15 train.py: 101] Epoch 0, iter 300, lr 0.100000, loss 18.324607 INFO 2021-06-04 19:56:29 train.py: 107] save checkpoint Epoch_0.pt to disk... Traceback (most recent call last): File "train.py", line 201, in train(args) File "train.py", line 145, in train prototype, optimizer, criterion, epoch, conf, loss_meter) File "train.py", line 88, in train_one_epoch images1_probe, images2_gallery, images2_probe, images1_gallery, id_indexes) File "/home/dl/dyj/venv37/lib/python3.7/site-packages/torch/nn/modules/module.py", line 493, in call result = self.forward(*input, **kwargs) File "../../head/SST_Prototype.py", line 70, in forward output1 = self.compute_theta(p1, g2, label, batch_size) File "../../head/SST_Prototype.py", line 45, in compute_theta queue[:,self.index:self.index+batch_size] = g.transpose(0,1) RuntimeError: The expanded size of the tensor (24) must match the existing size (64) at non-singleton dimension 1. Target sizes: [512, 24]. Tensor sizes: [512, 64]

ttrungtin2910 commented 2 years ago

I have same problem, please help me

Hubossen commented 2 months ago

请问解决了吗?