From 6643f3be1a3b8c1f25a6e7dda785d1a80db43aa0 Mon Sep 17 00:00:00 2001 From: lg Date: Sun, 26 Aug 2018 00:21:34 +0800 Subject: [PATCH 1/5] run document test --- .gitignore | 6 ++++-- .travis.yml | 10 ++++++++++ tests | 1 + 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 .travis.yml create mode 120000 tests diff --git a/.gitignore b/.gitignore index 99edee803..f0ad82b83 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ +.DS_Store +/.pytest_cache +/docs/test_build docs/_build tensorlayer/__pycache__ tensorlayer/*pyc -tensorlayer/layers/*pyc -.DS_Store tensorlayer/cli/__pycache__ +tensorlayer/layers/*pyc diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..826a6a33c --- /dev/null +++ b/.travis.yml @@ -0,0 +1,10 @@ +# https://docs.travis-ci.com/user/languages/python/ +language: python + +install: + - pip install tensorflow + - pip install yapf + - pip install -r requirements/requirements_doc.txt + +script: + - ./tests/test_documentation.py diff --git a/tests b/tests new file mode 120000 index 000000000..3defef460 --- /dev/null +++ b/tests @@ -0,0 +1 @@ +tensorlayer-master/tests \ No newline at end of file From d5e230ff0958b63af8217be8295c85ffcce21b8f Mon Sep 17 00:00:00 2001 From: lg Date: Sun, 26 Aug 2018 00:29:57 +0800 Subject: [PATCH 2/5] use python 3.6 --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 826a6a33c..946b75399 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,9 @@ # https://docs.travis-ci.com/user/languages/python/ language: python +python: + - '3.6' + install: - pip install tensorflow - pip install yapf From aca701d6e782d1877357899f17aab5e3d1cff7bd Mon Sep 17 00:00:00 2001 From: lg Date: Sun, 26 Aug 2018 00:38:15 +0800 Subject: [PATCH 3/5] fix doc test --- docs/modules/distributed.rst | 2 +- docs/modules/files.rst | 8 ++--- docs/modules/ops.rst | 61 ------------------------------------ 3 files changed, 5 insertions(+), 66 deletions(-) delete mode 100755 docs/modules/ops.rst diff --git a/docs/modules/distributed.rst b/docs/modules/distributed.rst index c4ef4b7fd..d5df22846 100755 --- a/docs/modules/distributed.rst +++ b/docs/modules/distributed.rst @@ -146,7 +146,7 @@ TensorFlow提供了一些 `Session Hooks `_ 中找到。 - -.. automodule:: tensorlayer.ops - -.. autosummary:: - - exit_tf - open_tb - clear_all - set_gpu_fraction - disable_print - enable_print - suppress_stdout - get_site_packages_directory - empty_trash - -TensorFlow 操作函数 ---------------------------- - -中断 Nvidia 进程 -^^^^^^^^^^^^^^^^^ -.. autofunction:: exit_tf - -打开 TensorBoard -^^^^^^^^^^^^^^^^^^^ -.. autofunction:: open_tb - -删除 placeholder -^^^^^^^^^^^^^^^^^^ -.. autofunction:: clear_all - -GPU 配置函数 ---------------------------- -.. autofunction:: set_gpu_fraction - -命令窗口显示 ------------------- - -禁止 print -^^^^^^^^^^^^ -.. autofunction:: disable_print - -允许 print -^^^^^^^^^^^^ -.. autofunction:: enable_print - -临时禁止 print -^^^^^^^^^^^^^^^^ -.. autofunction:: suppress_stdout - -Site packages 信息 --------------------- - -.. autofunction:: get_site_packages_directory - -垃圾管理 --------------------- -.. autofunction:: empty_trash From d714ad055ab36e15d59ac22e44c3704474acc951 Mon Sep 17 00:00:00 2001 From: lg Date: Sun, 26 Aug 2018 01:07:36 +0800 Subject: [PATCH 4/5] more fix --- docs/modules/prepro.rst | 4 ++-- docs/user/example.rst | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/modules/prepro.rst b/docs/modules/prepro.rst index 36477a8f2..22bc2bb0a 100755 --- a/docs/modules/prepro.rst +++ b/docs/modules/prepro.rst @@ -175,7 +175,7 @@ HSV 转 RGB .. autofunction:: hsv_to_rgb 调整色调(Hue) -^^^^^^^^^^^^^^ +^^^^^^^^^^^^^^^ .. autofunction:: adjust_hue @@ -210,7 +210,7 @@ HSV 转 RGB .. autofunction:: apply_transform 基于坐标点的的投影变换 -^^^^^^^^^^^^^^^^^^^^^ +^^^^^^^^^^^^^^^^^^^^^^ .. autofunction:: projective_transform_by_points diff --git a/docs/user/example.rst b/docs/user/example.rst index 66c0c14ac..00cb34ad2 100644 --- a/docs/user/example.rst +++ b/docs/user/example.rst @@ -14,7 +14,7 @@ Basics - Stacked Denoising Autoencoder and Fine-Tuning (MNIST). A MLP classification task, see `tutorial_mnist.py `_. - Convolutional Network (MNIST). Classification task, see `tutorial_mnist.py `_. - Convolutional Network (CIFAR-10). Classification task, see `tutorial_cifar10.py `_ and `tutorial_cifar10_tfrecord.py `_. - - TensorFlow dataset API for object detection see `here `_. + - TensorFlow dataset API for object detection see `tutorial_tf_dataset_voc.py `_. - Merge TF-Slim into TensorLayer. `tutorial_inceptionV3_tfslim.py `_. - Merge Keras into TensorLayer. `tutorial_keras.py `_. - Data augmentation with TFRecord. Effective way to load and pre-process data, see `tutorial_tfrecord*.py `_ and `tutorial_cifar10_tfrecord.py `_. @@ -78,12 +78,12 @@ Pretrained Models - SqueezeNet (ImageNet). Model compression, see `tl.models.SqueezeNetV1 `__ or `tutorial_squeezenet.py `_. - MobileNet (ImageNet). Model compression, see `tl.models.MobileNetV1 `__ or `tutorial_mobilenet.py `__. - More CNN implementations of `TF-Slim `_ can be connected to TensorLayer via SlimNetsLayer. - - All pretrained models in `here `_. + - All pretrained models in `tensorlayer/pretrained-models `_. Miscellaneous ================= - - TensorDB by `fangde `_ see `here `_. + - TensorDB by `fangde `_ see `akaraspt/tl_paper `_. - A simple web service - `TensorFlask `_ by `JoelKronander `__. From 77e47a41dbce980ba27dcb8ed4215495d583574f Mon Sep 17 00:00:00 2001 From: lg Date: Sun, 26 Aug 2018 12:16:30 +0800 Subject: [PATCH 5/5] fix --- docs/user/development.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/user/development.rst b/docs/user/development.rst index 1aa9219dc..3ca2e9b00 100755 --- a/docs/user/development.rst +++ b/docs/user/development.rst @@ -1,7 +1,7 @@ 开发 Development ================ -TensorLayer始于一个帝国理工的研究项目,目前由数位 `GitHub`_ 的贡献者负责维护和进行改进。 +TensorLayer始于一个帝国理工的研究项目,目前由数位 `Github`_ 的贡献者负责维护和进行改进。 作为一个为研究员和工程师开发的开源项目,我们诚挚地欢迎您为对项目提供帮助。 每个微小的支持都会帮助我们并且会被记录下来。 @@ -56,7 +56,7 @@ TensorLayer的想法源于组合TensorFlow的灵活性和正确的 building bloc """""""""""""" 无论什么时候您发现有些文档没有解释清楚,存在误导,敷衍带过或者根本就是错的。 -请及时更新它!*Edit on GitHub*的链接就在每一篇文档的右上角 +请及时更新它!*Edit on GitHub* 的链接就在每一篇文档的右上角 并且API引用列表中的每篇文档的*[source]*的链接可以帮助您快速地定位任何文字的根源。 @@ -109,6 +109,7 @@ TensorLayer有100%的代码覆盖率,这过去被证明是十分有用的的 * 每当您更改任何代码的时候,您应该运行测试脚本来测试它是否能优化现有属性。 * 您修改的每个BUG说明一个缺少的测试案例, + 所以每个修复BUG的方案应该配置一个您没修复前的测试案例。 发送拉请求 @@ -127,5 +128,5 @@ https://guides.github.com/introduction/flow/ GitHub会关闭那个问题。 -.. _GitHUb: http://github.com/zsdonghao/tensorlayer +.. _Github: http://github.com/zsdonghao/tensorlayer .. _our mailing list: hao.dong11@imperial.ac.uk