Skip to content

Commit

Permalink
rerun notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
Kautenja committed Feb 10, 2018
1 parent dd7bbd8 commit 32cb0da
Show file tree
Hide file tree
Showing 10 changed files with 89 additions and 70 deletions.
6 changes: 3 additions & 3 deletions VGG19-classification.ipynb

Large diffs are not rendered by default.

52 changes: 31 additions & 21 deletions content-reconstruction.ipynb

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions neural_stylization/reconstruct_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ def reconstruct_content(content_path: str,
# optimize the white noise to reconstruct the content
image = optimizer.minimize(noise, canvas.shape, step, iterations, callback)

# clear the Keras session
K.clear_session()

# de-normalize the image (from ImageNet means) and convert back to binary
return matrix_to_image(denormalize(image.reshape(canvas.shape)[0]))

Expand Down
3 changes: 3 additions & 0 deletions neural_stylization/reconstruct_style.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ def reconstruct_style(style_path: str,
# optimize the white noise to reconstruct the content
image = optimizer.minimize(noise, canvas.shape, step, iterations, callback)

# clear the Keras session
K.clear_session()

# de-normalize the image (from ImageNet means) and convert back to binary
return matrix_to_image(denormalize(image.reshape(canvas.shape)[0]))

Expand Down
3 changes: 3 additions & 0 deletions neural_stylization/transfer_style.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@ def stylize(self,
loss_grads,
iterations,
callback)
# clear the Keras session
K.clear_session()

# return the optimized image
return matrix_to_image(denormalize(image.reshape(canvas.shape)[0]))

Expand Down
28 changes: 14 additions & 14 deletions style-reconstruction.ipynb

Large diffs are not rendered by default.

64 changes: 32 additions & 32 deletions style-transfer.ipynb

Large diffs are not rendered by default.

Binary file modified tex/img/transfer/monet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tex/img/transfer/seated-nudes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tex/img/transfer/shipwreck.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 32cb0da

Please sign in to comment.