diff options
| author | Cameron <cysmith1010@gmail.com> | 2016-10-11 22:40:00 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-10-11 22:40:00 -0600 |
| commit | 4524885253aafb9928e0859fb1505ce9c22ab06c (patch) | |
| tree | a1de6f2248ddd413bbbde633df38529c899c7d3d /neural_style.py | |
| parent | 1b3e00480b9d99f34fea068009efe45bc76111fd (diff) | |
Added verbose to usage script
Diffstat (limited to 'neural_style.py')
| -rw-r--r-- | neural_style.py | 8 |
1 files changed, 4 insertions, 4 deletions
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): |
