From 4524885253aafb9928e0859fb1505ce9c22ab06c Mon Sep 17 00:00:00 2001 From: Cameron Date: Tue, 11 Oct 2016 22:40:00 -0600 Subject: Added verbose to usage script --- neural_style.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'neural_style.py') diff --git a/neural_style.py b/neural_style.py index 2f9673f..b62de21 100644 --- a/neural_style.py +++ b/neural_style.py @@ -203,9 +203,9 @@ def parse_args(): args = parser.parse_args() # normalize weights - args.style_layer_weights = norm(args.style_layer_weights) - args.content_layer_weights = norm(args.content_layer_weights) - args.style_imgs_weights = norm(args.style_imgs_weights) + args.style_layer_weights = normalize(args.style_layer_weights) + args.content_layer_weights = normalize(args.content_layer_weights) + args.style_imgs_weights = normalize(args.style_imgs_weights) # create directories for output if args.video: @@ -534,7 +534,7 @@ def read_weights_file(path): weights = np.dstack([vals.astype(np.float32)] * 3) return weights -def norm(weights): +def normalize(weights): return [float(i)/sum(weights) for i in weights] def maybe_make_directory(dir_path): -- cgit v1.2.3-70-g09d2