Skip to content

Commit 7cffdd5

Browse files
committed
[DOCS] add FQA
1 parent 1bce84e commit 7cffdd5

File tree

2 files changed

+51
-1
lines changed

2 files changed

+51
-1
lines changed

docs/user/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ However, if you want to modify or extend TensorLayer, you can download the repos
9393
.. code-block:: bash
9494
9595
cd to the root of the git tree
96-
pip install . -e
96+
pip install -e .
9797
9898
This command will run the ``setup.py`` to install TensorLayer. The ``-e`` reflects
9999
editable, then you can edit the source code in ``tensorlayer`` folder, and ``import`` the edited

docs/user/more.rst

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,58 @@ More
1111
1212
Coming soon
1313

14+
FQA
15+
===========
16+
17+
18+
Visualization
19+
--------------
20+
21+
Cannot save image
22+
^^^^^^^^^^^^^^^^^^^^^^^
23+
24+
If you run the script via SSH control, sometime you may
25+
26+
.. code-block:: bash
27+
28+
_tkinter.TclError: no display name and no $DISPLAY environment variable
29+
30+
Add the following code into the top of ``visualize.py``.
31+
32+
.. code-block:: python
33+
34+
import matplotlib
35+
matplotlib.use('Agg')
36+
import matplotlib.pyplot as plt
37+
38+
Editable Mode
39+
---------------
40+
41+
- 1. Download the TensorLayer folder from Github.
42+
- 2. Before editing the TensorLayer ``.py`` file.
43+
44+
- 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
45+
- 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.
46+
47+
.. code-block:: bash
48+
49+
pip install -e .
50+
51+
52+
Load Model
53+
--------------
54+
55+
Note that, the ``tl.files.load_npz()`` can only able to load the npz model saved by ``tl.files.save_npz()``.
56+
If you have a model want to load into your TensorLayer network, you can first assign your parameters into a list in order,
57+
then use ``tl.files.assign_params()`` to load the parameters into your TensorLayer model.
58+
59+
1460

61+
Python3
62+
^^^^^^^^
1563

64+
- Download the repo from Github.
65+
-
1666

1767
Recruitment
1868
===========

0 commit comments

Comments
 (0)