MA_CASANDRA_QUILANG:

But as a newbie I don’t understand why my model should have the shapes you have stated above, specifically the output’s shape and the target shape.


For the input shape I used the shaped defined in your script:
batch_x = train_x[i:i+BATCH_SIZE].view(-1, 3, 100, 100)

Using a random input in this shape, the model creates an output in the shape [batch_size, 2, 104, 104].



 MA_CASANDRA_QUILANG:

Lastly, I still don’t fully understand what target really is.


The target is the ground truth label of the sample. During the training of your model you are trying to get the model predictions as close to the target (label) as possible.