未验证 提交 4122c485 编写于 作者: 飞龙 提交者: GitHub

Merge pull request #106 from bigeyex/patch-6

修订 9.启动并运行_TensorFlow.md 中的代码排版问题
......@@ -103,11 +103,11 @@ print(result) 
```python
# way3  
init = tf.global_variables_initializer()  
with tf.Session() as sess:  
    init.run()  
    result = f.eval()  
6. print(result)  
init = tf.global_variables_initializer()  
with tf.Session() as sess:  
    init.run()  
    result = f.eval()  
  print(result)  
```
在 Jupyter 内部或在 Python shell 中,您可能更喜欢创建一个`InteractiveSession`。 与常规会话的唯一区别是,当创建`InteractiveSession`时,它将自动将其自身设置为默认会话,因此您不需要使用模块(但是您需要在完成后手动关闭会话):
......@@ -453,7 +453,7 @@ saver = tf.train.Saver({"weights": theta})
完整代码
```python
numpy as np
import numpy as np
from sklearn.datasets import fetch_california_housing
import tensorflow as tf
from sklearn.preprocessing import StandardScaler
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册