Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shapes dont match if resolution other than default 640 #164

Open
elicz opened this issue Jul 11, 2024 · 1 comment
Open

Shapes dont match if resolution other than default 640 #164

elicz opened this issue Jul 11, 2024 · 1 comment

Comments

@elicz
Copy link

elicz commented Jul 11, 2024

Change from:
compute_loss = torch_losses.Loss(device=device, nc=num_classes)

to
compute_loss = torch_losses.Loss(device=device, nc=num_classes, input_shape=imgsz)

compute_loss = torch_losses.Loss(device=device, nc=num_classes)

(I was using EfficientNet backbone, resolution of inputs 320x320, and keras backend - shapes mismatched in loss function)

@leondgarse
Copy link
Owner

Ya, you are right. Fix is updated. It's actually updated in torch_coco_train_script.py, but missed here.

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

No branches or pull requests

2 participants