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):
|
||||
self.optimizer_G.zero_grad()
|
||||
|
||||
# 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)
|
||||
self.fake_H = self.fea_train(self.var_L, interpolate_factor=2)
|
||||
ref_H = self.net_ref(self.real_H)
|
||||
l_fea = self.cri_fea(self.fake_H, ref_H)
|
||||
l_fea.backward()
|
||||
|
|
Loading…
Reference in New Issue
Block a user