Your output looks like a an output for

a multi-class classification use case, where you could keep the shapes and use nn.CrossEntropyLoss as the criterion (if target contains the class indices)
or a multi-label classification (zero, one or more samples can be valid in each sample), in which case you could keep the criterion, but would have to provide a target tensor in the same shape as the model output.