1-13-am commited on
Commit
9e3b4df
1 Parent(s): 190472c

Update network.py

Browse files
Files changed (1) hide show
  1. network.py +2 -2
network.py CHANGED
@@ -104,7 +104,7 @@ class Style_Transfer_Network(nn.Module):
104
  # encode style images
105
  style_features = []
106
  for style in styles:
107
- if preserve_color == 'whiten_and_color' or preserve_color == 'histogram_matching':
108
  style = batch_wct(style, content)
109
  style_features.append(self.encoder(style))
110
 
@@ -117,7 +117,7 @@ class Style_Transfer_Network(nn.Module):
117
  transformed_feature = sum(transformed_features)
118
 
119
  stylized_image = self.decoder(transformed_feature)
120
- if preserve_color == "whiten_and_color":
121
  stylized_image = batch_wct(stylized_image, content)
122
  if preserve_color == "histogram_matching":
123
  stylized_image = batch_histogram_matching(stylized_image, content)
 
104
  # encode style images
105
  style_features = []
106
  for style in styles:
107
+ if preserve_color == 'whitening_and_coloring' or preserve_color == 'histogram_matching':
108
  style = batch_wct(style, content)
109
  style_features.append(self.encoder(style))
110
 
 
117
  transformed_feature = sum(transformed_features)
118
 
119
  stylized_image = self.decoder(transformed_feature)
120
+ if preserve_color == "whitening_and_coloring":
121
  stylized_image = batch_wct(stylized_image, content)
122
  if preserve_color == "histogram_matching":
123
  stylized_image = batch_histogram_matching(stylized_image, content)