Thank you for your reply, my target is torch.Size([32]), and now I’m making it equal by using 32, here are the shapes for the tensors’ size after every convolution block
torch.Size([32, 3, 152, 152])
torch.Size([32, 128, 76, 76])
torch.Size([32, 256, 38, 38])
torch.Size([32, 512, 19, 19])
torch.Size([32, 256, 10, 10])
torch.Size([32, 128, 5, 5])
now I use 32 as the batch_size and it gives me error

Expected input batch_size (288) to match target batch_size (32)

How to counter this? Thank you very much once again