Skip to content

[pls merge] All pooling layers support data_format #809

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Aug 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,18 @@ To release a new version, please update the changelog as followed:
- Release SwitchNormLayer (PR #737)
- Release QuanConv2d, QuanConv2dWithBN, QuanDenseLayer, QuanDenseLayerWithBN (PR#735)
- Update Core Layer to support graph (PR #751)
- All Pooling layers support `data_format` (PR #809)
- Setup:
- Creation of installation flaggs `all_dev`, `all_cpu_dev`, and `all_gpu_dev` (PR #739)
- Tutorials:
- Examples:
- change folder struction (PR #802)
- `tutorial_models_vgg19` has been introduced to show how to use `tl.model.vgg19` (PR #698).
- fix bug of `tutorial_bipedalwalker_a3c_continuous_action.py` (PR #734, Issue #732)
- `tutorial_models_vgg16` and `tutorial_models_vgg19` has been changed the input scale from [0,255] to [0,1](PR #710)
- `tutorial_mnist_distributed_trainer.py` and `tutorial_cifar10_distributed_trainer.py` are added to explain the uses of Distributed Trainer (PR #700)
- add `tutorial_quanconv_cifar10.py` and `tutorial_quanconv_mnist.py` (PR #735)
- add `tutorial_work_with_onnx.py`(PR #775)
- Examples:
- Applications:
- [Arbitrary Style Transfer in Real-time with Adaptive Instance Normalization](https://arxiv.org/abs/1703.06868) (PR #799)

### Changed
Expand Down Expand Up @@ -146,8 +148,8 @@ To release a new version, please update the changelog as followed:
- @DEKHTIARJonathan: #739 #747 #750 #754
- @lgarithm: #705 #700
- @OwenLiuzZ: #698 #710 #775 #776
- @zsdonghao: #711 #712 #734 #736 #737 #700 #751
- @luomai: #700 #751 #766
- @zsdonghao: #711 #712 #734 #736 #737 #700 #751 #809
- @luomai: #700 #751 #766 #802
- @XJTUWYD: #735
- @mutewall: #735
- @thangvubk: #759
Expand Down
60 changes: 60 additions & 0 deletions applications/adaptive_style_transfer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
## Adaptive Style Transfer in TensorFlow and TensorLayer

### Usage

1. TensorLayer implementation of the ICCV 2017 Paper [Arbitrary Style Transfer in Real-time with Adaptive Instance Normalization](https://arxiv.org/abs/1703.06868) which supports any styles in one single model.

2. You can use the <b>train.py</b> script to train your own model. To train the model, you need to download [MSCOCO dataset](http://cocodataset.org/#download) and [Wikiart dataset](https://www.kaggle.com/c/painter-by-numbers), and put the dataset images under the <b>'dataset/COCO\_train\_2014'</b> folder and <b>'dataset/wiki\_all\_images'</b> folder.


3. Alternatively, you can use the <b>test.py</b> script to run my pretrained models. My pretrained models can be downloaded from [here](https://github.com/tensorlayer/pretrained-models/tree/master/models/style_transfer_pretrained_models), and should be put into the <b>'pretrained_models'</b> folder for testing. The example images for testing can be download from [here](https://github.com/tensorlayer/pretrained-models/tree/master/models/style_transfer_models_and_examples)



### Results

Here are some result images (Left to Right: Content , Style , Result):

<div align="center">
<img src="https://github.com/tensorlayer/pretrained-models/blob/master/models/style_transfer_models_and_examples/images/content/content_1.png" width=250 height=250>
<img src="https://github.com/tensorlayer/pretrained-models/blob/master/models/style_transfer_models_and_examples/images/style/style_5.png" width=250 height=250>
<img src="./images/output/style_5_content_1.jpg" width=250 height=250>
</div>


<div align="center">
<img src="https://github.com/tensorlayer/pretrained-models/blob/master/models/style_transfer_models_and_examples/images/content/content_2.png" width=250 height=250>
<img src="https://github.com/tensorlayer/pretrained-models/blob/master/models/style_transfer_models_and_examples/images/style/style11.png" width=250 height=250>
<img src="https://github.com/tensorlayer/pretrained-models/blob/master/models/style_transfer_models_and_examples/images/output/style_11_content2.png" width=250 height=250>
</div>

<div align="center">
<img src="https://github.com/tensorlayer/pretrained-models/blob/master/models/style_transfer_models_and_examples/images/content/chicago.jpg" width=250 height=250>
<img src="https://github.com/tensorlayer/pretrained-models/blob/master/models/style_transfer_models_and_examples/images/style/cat.jpg" width=250 height=250>
<img src="https://github.com/tensorlayer/pretrained-models/blob/master/models/style_transfer_models_and_examples/images/output/cat_chicago.jpg" width=250 height=250>
</div>



<div align="center">
<img src="https://github.com/tensorlayer/pretrained-models/blob/master/models/style_transfer_models_and_examples/images/content/lance.jpg" width=250 height=250>
<img src="https://github.com/tensorlayer/pretrained-models/blob/master/models/style_transfer_models_and_examples/images/style/lion.jpg" width=250 height=250>
<img src="https://github.com/tensorlayer/pretrained-models/blob/master/models/style_transfer_models_and_examples/images/output/lion_lance.jpg" width=250 height=250>
</div>
<div align="center">
<img src="https://github.com/tensorlayer/pretrained-models/blob/master/models/style_transfer_models_and_examples/images/content/content_4.png" width=250 height=250>
<img src="https://github.com/tensorlayer/pretrained-models/blob/master/models/style_transfer_models_and_examples/images/style/style_6.png" width=250 height=250>
<img src="https://github.com/tensorlayer/pretrained-models/blob/master/models/style_transfer_models_and_examples/images/output/style_6_content_4.jpg" width=250 height=250>
</div>

<div align="center">
<img src="https://github.com/tensorlayer/pretrained-models/blob/master/models/style_transfer_models_and_examples/images/content/lance.jpg" width=250 height=250>
<img src="https://github.com/tensorlayer/pretrained-models/blob/master/models/style_transfer_models_and_examples/images/style/udnie.jpg" width=250 height=250>
<img src="https://github.com/tensorlayer/pretrained-models/blob/master/models/style_transfer_models_and_examples/images/output/udnie_lance.jpg" width=250 height=250>
</div>

Enjoy!

### License

- This project for academic use only.
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ to the library as a developer.
:caption: Starting with TensorLayer

user/installation
user/tutorial
user/example
user/tutorials
user/examples
user/contributing
user/get_involved
user/faq
Expand Down
Loading