TypeError Traceback (most recent call last)
in ()
12 input_img = content_img.clone()
13
---> 14 out = run_style_transfer(content_img, style_img, input_img, num_epoches=200)
15
16 show_img(out.cpu())
E:\here\jupter\neural-transfer-master\neural-transfer-master\run_code.py in run_style_transfer(content_img, style_img, input_img, num_epoches)
46 return style_score + content_score
47
---> 48 optimizer.step(closure)
49
50 input_param.data.clamp_(0, 1)
E:\program\anaconda\lib\site-packages\torch\optim\lbfgs.py in step(self, closure)
101
102 # evaluate initial f(x) and df/dx
--> 103 orig_loss = closure()
104 loss = float(orig_loss)
105 current_evals = 1
E:\here\jupter\neural-transfer-master\neural-transfer-master\run_code.py in closure()
33 optimizer.zero_grad()
34 for sl in style_loss_list:
---> 35 style_score += sl.backward()
36 for cl in content_loss_list:
37 content_score += cl.backward()
E:\here\jupter\neural-transfer-master\neural-transfer-master\loss.py in backward(self, retain_variabels)
48
49 def backward(self, retain_variabels=True):
---> 50 self.loss.backward(retain_variables=retain_variabels) #
51 return self.loss
TypeError: backward() got an unexpected keyword argument 'retain_variables'