Skip to content

fix: ft_net_middle fails on batch size 1 due to torch.squeeze - #89

Open
andrewwhitecdw wants to merge 1 commit into
NVlabs:masterfrom
andrewwhitecdw:bugfix/reidmodel-25d37ff7
Open

fix: ft_net_middle fails on batch size 1 due to torch.squeeze#89
andrewwhitecdw wants to merge 1 commit into
NVlabs:masterfrom
andrewwhitecdw:bugfix/reidmodel-25d37ff7

Conversation

@andrewwhitecdw

@andrewwhitecdw andrewwhitecdw commented Jul 27, 2026

Copy link
Copy Markdown

Problem

fix: ft_net_middle fails on batch size 1 due to torch.squeeze

Fix

Replace:

        x = torch.cat((x0,x1),1)
        x = torch.squeeze(x)
        x = self.classifier(x)

with:

        x = torch.cat((x0,x1),1)
        x = x.view(x.size(0), -1)
        x = self.classifier(x)

Files changed

  • reIDmodel.py

@andrewwhitecdw
andrewwhitecdw marked this pull request as ready for review August 3, 2026 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant