r/pytorch • • 21d ago

PyTorch training issue in one dataset while failed in another

[deleted] — view deleted post

1 Upvotes

1 comment sorted by

2

u/Pantaenius 20d ago

It’s a loss error, so usually that suggests that your prediction and target tensor has different lengths / number of classes.
The direct hint is at t < n_classes

I suggest you remove the image / target or check the loss configuration or how the target / prediction is created and that dimensions are correct