Skip to content

Commit

Permalink
Updated script helper
Browse files Browse the repository at this point in the history
  • Loading branch information
titu1994 committed Mar 27, 2017
1 parent 7b6a1bf commit baa9313
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions script_helper/Script/INetwork.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,10 +402,10 @@ def style_loss(style, combination, mask_path=None, nb_channels=None):
assert K.ndim(combination) == 3

if mask_path is not None:
style_mask = load_mask(mask_path, nb_channels)
style_mask = K.variable(load_mask(mask_path, nb_channels))

style = style * style_mask
combination = combination * style_mask
style = style * K.stop_gradient(style_mask)
combination = combination * K.stop_gradient(style_mask)

del style_mask

Expand Down
6 changes: 3 additions & 3 deletions script_helper/Script/Network.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,10 +399,10 @@ def style_loss(style, combination, mask_path=None, nb_channels=None):
assert K.ndim(combination) == 3

if mask_path is not None:
style_mask = load_mask(mask_path, nb_channels)
style_mask = K.variable(load_mask(mask_path, nb_channels))

style = style * style_mask
combination = combination * style_mask
style = style * K.stop_gradient(style_mask)
combination = combination * K.stop_gradient(style_mask)

del style_mask

Expand Down

0 comments on commit baa9313

Please sign in to comment.