Permalink
Browse files

Scale A image to size of B images under tensorflow

  • Loading branch information...
1 parent f9e5c0e commit bc4e88f1ea62d93b797bf8187f17726bdee78468 @awentzonline committed Dec 4, 2016
Showing with 3 additions and 0 deletions.
  1. +3 −0 image_analogy/argparser.py
@@ -94,6 +94,9 @@ def parse_args():
args = parser.parse_args()
assert args.a_scale_mode in ('ratio', 'none', 'match'), 'a-scale-mode must be set to one of "ratio", "none", or "match"'
+ if K.backend() == 'tensorflow':
+ print('Tensorflow detected. Forcing --a-scale-mode=match (A images are scaled to same size as B images)')
+ args.a_scale_mode = 'match'
# make sure weights are in place
if not os.path.exists(args.vgg_weights):
print('Model weights not found (see "--vgg-weights" parameter).')

0 comments on commit bc4e88f

Please sign in to comment.