Sir, I checked the shape of my output and target and I found that my output has the shape [100, 3, 104, 104] and my target shape is [100, 2]. Now, I find it difficult to adjust my target shape. Can you please give any suggestion where should I adjust it? in your previous answers you stated that my target should have the shape [batch_size, 104, 104] but it doesn’t coincide to what I got thus getting the error: RuntimeError: only batches of spatial targets supported (3D tensors) but got targets of dimension: 2