Hey print your target, input shape and see.
If you use a cross entropy loss function then,
The shapes of input and target  should be like:
Example:
Input: (1,1,160,160)
Target:(1,160,160)
Hope this helps