Skip to content

Commit 49ac3eb

Browse files
csferngtensorflow-copybara
authored andcommitted
Update installation guide.
PiperOrigin-RevId: 268117499
1 parent a9c218f commit 49ac3eb

File tree

1 file changed

+43
-11
lines changed

1 file changed

+43
-11
lines changed

g3doc/install.md

Lines changed: 43 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,29 @@ On macOS:
4444

4545
Note: To exit the virtual environment, run `deactivate`.
4646

47-
#### 3. Install the Neural Structured Learning `pip` package.
47+
#### 3. Install TensorFlow
48+
49+
Neural Structured Learning requires TensorFlow 1.15 or higher.
50+
51+
CPU support:
52+
53+
<pre class="prettyprint lang-bsh">
54+
<code class="devsite-terminal tfo-terminal-venv">pip install tensorflow>=1.15.0rc0</code>
55+
</pre>
56+
57+
GPU support:
58+
59+
<pre class="prettyprint lang-bsh">
60+
<code class="devsite-terminal tfo-terminal-venv">pip install tensorflow-gpu>=1.15.0rc0</code>
61+
</pre>
62+
63+
#### 4. Install the Neural Structured Learning `pip` package.
4864

4965
<pre class="prettyprint lang-bsh">
5066
<code class="devsite-terminal tfo-terminal-venv">pip install --upgrade neural_structured_learning</code>
5167
</pre>
5268

53-
#### 4. (Optional) Test Neural Structured Learning.
69+
#### 5. (Optional) Test Neural Structured Learning.
5470

5571
<pre class="prettyprint lang-bsh">
5672
<code class="devsite-terminal tfo-terminal-venv">python -c "import neural_structured_learning as nsl"</code>
@@ -60,7 +76,7 @@ Success: Neural Structured Learning is now installed.
6076

6177
## Build the Neural Structured Learning pip package
6278

63-
### 1. Install the Python development environment.
79+
#### 1. Install the Python development environment.
6480

6581
On Ubuntu:
6682

@@ -80,18 +96,18 @@ On macOS:
8096
<code class="devsite-terminal">sudo pip3 install --upgrade virtualenv # system-wide install</code>
8197
</pre>
8298

83-
### 2. Install Bazel.
99+
#### 2. Install Bazel.
84100

85101
[Install Bazel](https://docs.bazel.build/versions/master/install.html), the
86102
build tool used to compile Neural Structured Learning.
87103

88-
### 3. Clone the Neural Structured Learning repository.
104+
#### 3. Clone the Neural Structured Learning repository.
89105

90106
<pre class="prettyprint lang-bsh">
91107
<code class="devsite-terminal">git clone https://github.com/tensorflow/neural-structured-learning.git</code>
92108
</pre>
93109

94-
### 4. Create a virtual environment.
110+
#### 4. Create a virtual environment.
95111

96112
<pre class="prettyprint lang-bsh">
97113
<code class="devsite-terminal">virtualenv --python python3 "./venv"</code>
@@ -101,32 +117,48 @@ build tool used to compile Neural Structured Learning.
101117

102118
Note: To exit the virtual environment, run `deactivate`.
103119

104-
### 5. Install Neural Structured Learning dependencies.
120+
#### 5. Install Tensorflow
121+
122+
Neural Structured Learning requires TensorFlow 1.15 or higher.
123+
124+
CPU support:
125+
126+
<pre class="prettyprint lang-bsh">
127+
<code class="devsite-terminal tfo-terminal-venv">pip install tensorflow>=1.15.0rc0</code>
128+
</pre>
129+
130+
GPU support:
131+
132+
<pre class="prettyprint lang-bsh">
133+
<code class="devsite-terminal tfo-terminal-venv">pip install tensorflow-gpu>=1.15.0rc0</code>
134+
</pre>
135+
136+
#### 6. Install Neural Structured Learning dependencies.
105137

106138
<pre class="prettyprint lang-bsh">
107139
<code class="devsite-terminal">cd neural-structured-learning</code>
108140
<code class="devsite-terminal tfo-terminal-venv">pip install --requirement neural_structured_learning/requirements.txt</code>
109141
</pre>
110142

111-
### 6. (Optional) Unit Test Neural Structured Learning.
143+
#### 7. (Optional) Unit Test Neural Structured Learning.
112144

113145
<pre class="prettyprint lang-bsh">
114146
<code class="devsite-terminal tfo-terminal-venv">bazel test //neural_structured_learning/...</code>
115147
</pre>
116148

117-
### 7. Build the pip package.
149+
#### 8. Build the pip package.
118150

119151
<pre class="prettyprint lang-bsh">
120152
<code class="devsite-terminal tfo-terminal-venv">python setup.py bdist_wheel --universal --dist-dir="./wheel"</code>
121153
</pre>
122154

123-
### 8. Install the pip package.
155+
#### 9. Install the pip package.
124156

125157
<pre class="prettyprint lang-bsh">
126158
<code class="devsite-terminal tfo-terminal-venv">pip install --upgrade ./wheel/neural_structured_learning*.whl</code>
127159
</pre>
128160

129-
### 9. Test Neural Structured Learning.
161+
#### 10. Test Neural Structured Learning.
130162

131163
<pre class="prettyprint lang-bsh">
132164
<code class="devsite-terminal tfo-terminal-venv">python -c "import neural_structured_learning as nsl"</code>

0 commit comments

Comments
 (0)