Skip to content

Commit

Permalink
超解像が動かないバグを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiroshiba committed Feb 27, 2018
1 parent a760662 commit b77e381
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
6 changes: 6 additions & 0 deletions become_yukarin/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,9 @@ def backward_compatible(d: Dict):
if 'target_global_noise' not in d['dataset']:
d['dataset']['target_global_noise'] = d['dataset']['global_noise']
d['dataset']['target_local_noise'] = d['dataset']['local_noise']

if 'generator_base_channels' not in d['model']:
d['model']['generator_base_channels'] = 64
d['model']['generator_extensive_layers'] = 8
d['model']['discriminator_base_channels'] = 32
d['model']['discriminator_extensive_layers'] = 5
6 changes: 6 additions & 0 deletions become_yukarin/config/sr_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,9 @@ def create_from_json(s: Union[str, Path]):
def backward_compatible(d: Dict):
if 'blur_size_factor' not in d['dataset']:
d['dataset']['blur_size_factor'] = 0

if 'generator_base_channels' not in d['model']:
d['model']['generator_base_channels'] = 64
d['model']['generator_extensive_layers'] = 8
d['model']['discriminator_base_channels'] = 32
d['model']['discriminator_extensive_layers'] = 5
4 changes: 2 additions & 2 deletions become_yukarin/model/sr_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ class SRPredictor(chainer.Chain):
def __init__(self, in_ch, out_ch, base, extensive_layers) -> None:
super().__init__()
with self.init_scope():
self.encoder = Encoder(in_ch, base=base, extensive_layers=extensive_layers)
self.decoder = Decoder(out_ch, base=base, extensive_layers=extensive_layers)
self.encoder = SREncoder(in_ch, base=base, extensive_layers=extensive_layers)
self.decoder = SRDecoder(out_ch, base=base, extensive_layers=extensive_layers)

def __call__(self, x):
return self.decoder(self.encoder(x))
Expand Down

0 comments on commit b77e381

Please sign in to comment.