Sorry,I have a problem about input and target shapes do not match when I rerun your code.
Could you give me some advices?
Traceback (most recent call last): File "main.py", line 137, in <module> err_rec = (1 - m_lambda) * loss_rec(rec_img, inputv_img) File "/home/gqwang/anaconda2/lib/python2.7/site-packages/torch/nn/modules/module.py", line 491, in __call__ result = self.forward(*input, **kwargs) File "/home/gqwang/anaconda2/lib/python2.7/site-packages/torch/nn/modules/loss.py", line 372, in forward return F.mse_loss(input, target, size_average=self.size_average, reduce=self.reduce) File "/home/gqwang/anaconda2/lib/python2.7/site-packages/torch/nn/functional.py", line 1569, in mse_loss input, target, size_average, reduce) File "/home/gqwang/anaconda2/lib/python2.7/site-packages/torch/nn/functional.py", line 1537, in _pointwise_loss return lambd_optimized(input, target, size_average, reduce) RuntimeError: input and target shapes do not match: input [64 x 1024], target [64 x 1 x 32 x 32] at /opt/conda/conda-bld/pytorch_1524577177097/work/aten/src/THCUNN/generic/MSECriterion.cu:15 Exception NameError: "global name 'FileNotFoundError' is not defined" in <bound method _DataLoaderIter.__del__ of <torch.utils.data.dataloader._DataLoaderIter object at 0x7f35aac72b10>> ignored