cvlab-yonsei / LbA

An official PyTorch implementation of the paper "Learning by Aligning: Visible-Infrared Person Re-identification using Cross-Modal Correspondences", ICCV 2021.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When running "train. Py", there is a problem on line 132 of the "model. Py" file:

redsoup opened this issue · comments

When running "train. Py", there is a problem on line(loss = torch.mean(comask_pos * self.criterion(feat, feat_recon_pos, feat_recon_neg))) 132 of the "model. Py" file:
Traceback:RuntimeError: The size of tensor a (9) must match the size of tensor b (18) at non-singleton dimension 3

Hello. Thank you for reaching out.
Your issue seems to be deprecated in #4 .

Check whether your PyTorch version is 1.7.1, or use our provided Dockerfile (even better).
For other PyTorch versions, I recommend reshaping input tensors to nn.TripletMarginLoss.

Let me know if you have any further problems by re-opening this issue.