This project aims at visualize loss and other important metrics for analysis.
This project also implement an instance of neural-style, follows the idea of a keras example keras/examples/neural_style_transfer.py
,
but with a mostly different design.
Visualization is important and fun. It tells us what's going on.
- python 3
- keras
- tensorflow >= 0.9.0 / Theano
- h5py
- Pillow
- requests
- tornado
make sure you have the requirements above, or type this in your command line:
sudo pip install -r requirements.txt
if you want to use tensorflow as backend, follow the instruction to install tensorflow first
then
python neural_style.py
now you can see the neural style board in localhost:8000
For example, you may find an bad output
after comparing the loss, you will found negative correlation between style loss and content loss(against the assumption of neural-style):
so a very small picture may not be very suitable for neural-style task.
Here's a better result with nearly independent loss:
A very high learning rate:
You can stop your training at any time and continue at the last epoch.
You are free to adjust hyperparameter
Using TensorFlow as backend.
CPU: about 30 seconds/iter on Macbook Pro
GPU: about 0.3 s/iter on an K20