WonwoongCho / Generative-Inpainting-pytorch

This is a pytorch version of the Generative Image Inpainting with Contextual Attention
71 stars 14 forks source link

problem on run.py #4

Open zhangbaijin opened 5 years ago

zhangbaijin commented 5 years ago

when i run.py,this is problem,i dont know why,

TypeError: l1_loss() takes from 2 to 3 positional arguments but 4 were given

Andrej-sens commented 5 years ago

Same problem here.

lvxm0 commented 5 years ago

Same problem!QAQ

micklexqg commented 5 years ago

Same problem

zhengbowei commented 4 years ago

I deleted the latter two parameters and changed them to “def _pointwise_loss(self, lambd, lambd_optimized, input, target, discounting_mask, size_average=True, reduce=True): if target.requires_grad: d = lambd(input, target) d = d * discounting_mask if not reduce: return d return torch.mean(d) if size_average else torch.sum(d) else: return lambd_optimized(input, target)”。 it can run。

01SHENyankun commented 2 years ago

20210915103230

jiangxinke commented 2 years ago

20210915103230

you need to download the CelebA datasets and the filename file...