You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

faq.rst 4.7 kB

4 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. .. _faq:
  2. ============
  3. FAQ
  4. ============
  5. How to effectively learn TensorLayer
  6. =====================================
  7. No matter what stage you are in, we recommend you to spend just 10 minutes to
  8. read the source code of TensorLayer and the `Understand layer / Your layer <http://tensorlayer.readthedocs.io/en/stable/modules/layers.html>`__
  9. in this website, you will find the abstract methods are very simple for everyone.
  10. Reading the source codes helps you to better understand TensorFlow and allows
  11. you to implement your own methods easily. For discussion, we recommend
  12. `Gitter <https://gitter.im/tensorlayer/Lobby#?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge>`__,
  13. `Help Wanted Issues <https://waffle.io/tensorlayer/tensorlayer>`__,
  14. `QQ group <https://github.com/tensorlayer/tensorlayer/blob/master/img/img_qq.png>`__
  15. and `Wechat group <https://github.com/shorxp/tensorlayer-chinese/blob/master/docs/wechat_group.md>`__.
  16. Beginner
  17. -----------
  18. For people who new to deep learning, the contributors provided a number of tutorials in this website, these tutorials will guide you to understand autoencoder, convolutional neural network, recurrent neural network, word embedding and deep reinforcement learning and etc. If your already understand the basic of deep learning, we recommend you to skip the tutorials and read the example codes on `Github <https://github.com/tensorlayer/tensorlayer>`__ , then implement an example from scratch.
  19. Engineer
  20. ------------
  21. For people from industry, the contributors provided mass format-consistent examples covering computer vision, natural language processing and reinforcement learning. Besides, there are also many TensorFlow users already implemented product-level examples including image captioning, semantic/instance segmentation, machine translation, chatbot and etc., which can be found online.
  22. It is worth noting that a wrapper especially for computer vision `Tf-Slim <https://github.com/tensorflow/models/tree/master/slim#Pretrained>`__ can be connected with TensorLayer seamlessly.
  23. Therefore, you may able to find the examples that can be used in your project.
  24. Researcher
  25. -------------
  26. For people from academia, TensorLayer was originally developed by PhD students who facing issues with other libraries on implement novel algorithm. Installing TensorLayer in editable mode is recommended, so you can extend your methods in TensorLayer.
  27. For research related to image processing such as image captioning, visual QA and etc., you may find it is very helpful to use the existing `Tf-Slim pre-trained models <https://github.com/tensorflow/models/tree/master/slim#Pretrained>`__ with TensorLayer (a specially layer for connecting Tf-Slim is provided).
  28. Install Master Version
  29. ========================
  30. To use all new features of TensorLayer, you need to install the master version from Github.
  31. Before that, you need to make sure you already installed git.
  32. .. code-block:: bash
  33. [stable version] pip install tensorlayer
  34. [master version] pip install git+https://github.com/tensorlayer/tensorlayer.git
  35. Editable Mode
  36. ===============
  37. - 1. Download the TensorLayer folder from Github.
  38. - 2. Before editing the TensorLayer ``.py`` file.
  39. - If your script and TensorLayer folder are in the same folder, when you edit the ``.py`` inside TensorLayer folder, your script can access the new features.
  40. - If your script and TensorLayer folder are not in the same folder, you need to run the following command in the folder contains ``setup.py`` before you edit ``.py`` inside TensorLayer folder.
  41. .. code-block:: bash
  42. pip install -e .
  43. Load Model
  44. ===========
  45. Note that, the ``tl.files.load_npz()`` can only able to load the npz model saved by ``tl.files.save_npz()``.
  46. If you have a model want to load into your TensorLayer network, you can first assign your parameters into a list in order,
  47. then use ``tl.files.assign_params()`` to load the parameters into your TensorLayer model.
  48. .. _GitHub: https://github.com/tensorlayer/tensorlayer
  49. .. _Deeplearning Tutorial: http://deeplearning.stanford.edu/tutorial/
  50. .. _Convolutional Neural Networks for Visual Recognition: http://cs231n.github.io/
  51. .. _Neural Networks and Deep Learning: http://neuralnetworksanddeeplearning.com/
  52. .. _TensorFlow tutorial: https://www.tensorflow.org/versions/r0.9/tutorials/index.html
  53. .. _Understand Deep Reinforcement Learning: http://karpathy.github.io/2016/05/31/rl/
  54. .. _Understand Recurrent Neural Network: http://karpathy.github.io/2015/05/21/rnn-effectiveness/
  55. .. _Understand LSTM Network: http://colah.github.io/posts/2015-08-Understanding-LSTMs/
  56. .. _Word Representations: http://colah.github.io/posts/2014-07-NLP-RNNs-Representations/

TensorLayer3.0 是一款兼容多种深度学习框架为计算后端的深度学习库。计划兼容TensorFlow, Pytorch, MindSpore, Paddle.