Skip to content

Commit

Permalink
FIX: input images filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
Remi Cresson committed Mar 13, 2021
1 parent fca60ed commit 0a4db5d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions code/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,14 @@ def _get_normalized_input(key, scale, name):

lr_image = _get_normalized_input(constants.lr_key, params.lr_scale, constants.lr_input_name)
hr_image = _get_normalized_input(constants.hr_key, params.hr_scale, constants.hr_input_name)

# model
hr_nch = ds.output_shapes[constants.hr_key][-1]
generator = partial(network.generator, scope=constants.gen_scope, nchannels=hr_nch, nresblocks=params.nresblocks,
dim=params.depth)
generator = partial(network.generator, scope=constants.gen_scope, nchannels=hr_nch,
nresblocks=params.nresblocks, dim=params.depth)
discriminator = partial(network.discriminator, scope=constants.dis_scope, dim=params.depth)

hr_images_real = {factor: downscale2d(blur2d(hr_image), factor=factor) for factor in constants.factors}
hr_images_real = {factor: downscale2d(hr_image, factor=factor) for factor in constants.factors}
hr_images_fake = generator(lr_image)

# model outputs
Expand Down

0 comments on commit 0a4db5d

Please sign in to comment.