Hello,
I’d like to train a U-net  which  must accept a 3 channel image and return a 3 channel image.
In a nutshell, the loss should accept as input B x C x H x W and as target B x C x H x C.
This kind of network has for goal standard image processing, that’s what justify this approach.
Im actually getting a coherent error :

invalid argument 1: only batches of spatial targets supported (3Dtensors) but got targets of dimension: 4 at /opt/conda/conda-bld/pytorch_1518243271935/work/torch/lib/THCUNN/generic/SpatialClassNLLCriterion.cu:14

Hope I was clearly explaining my problem and hope for some feedbacks.
Thanks.