forked from mrq/DL-Art-School
Feature mode -> back to LR fea
This commit is contained in:
parent
1086f0476b
commit
50ca17bb0a
|
@ -72,12 +72,7 @@ class FeatureModel(BaseModel):
|
||||||
|
|
||||||
def optimize_parameters(self, step):
|
def optimize_parameters(self, step):
|
||||||
self.optimizer_G.zero_grad()
|
self.optimizer_G.zero_grad()
|
||||||
|
self.fake_H = self.fea_train(self.var_L, interpolate_factor=2)
|
||||||
# grey out the LR image but keep 3 channels.
|
|
||||||
lr = torch.mean(self.real_H, dim=1, keepdim=True)
|
|
||||||
lr = lr.repeat(1, 3, 1, 1)
|
|
||||||
|
|
||||||
self.fake_H = self.fea_train(lr, interpolate_factor=1)
|
|
||||||
ref_H = self.net_ref(self.real_H)
|
ref_H = self.net_ref(self.real_H)
|
||||||
l_fea = self.cri_fea(self.fake_H, ref_H)
|
l_fea = self.cri_fea(self.fake_H, ref_H)
|
||||||
l_fea.backward()
|
l_fea.backward()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user