Training a semantic segmentation model with HRnet OCrRand getting this error ValueError:…
- User
Training a semantic segmentation model with HRnet OCrRand getting this error ValueError: Target size (torch.Size([16, 1, 350, 350])) must be the same as input size (torch.Size([16, 1, 88, 88])) How do I fix this error relating to model output mask dimensions
Assistant
The error message you're seeing suggests that the model is expecting a mask with dimensions of (16, 1, 350, 350), but the input it's receiving is of shape (16, 1, 88, 88). This means that the two dimensions (height and width) do not match up, which is causing the error. To fix this issue, you need to make sure that the input and output masks have the same dimensions. You can do this by either resizing the input mask to match the dimensions of the output mask or by resizing the output mask to match the dimensions of the input mask. Here's an example of how you could resize an input mask to match the dimensions of an output mask:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.