一、采用git bash來安裝,確認已經安裝了git
二、手動找到TensorFlow的模塊文件夾地址,若不知道,輸入以下兩行代碼:
import tensorflow as tf
tf.__path__
輸出的地址為TensorFlow模塊所在地址
三、在此地址右鍵:git bash here
四、在git bash中輸入以下命令:
git clone --recurse-submodules https://github.com/tensorflow/models
五、安裝編譯完畢會發現tf文件夾下已經有models文件夾了
導入程序試試看
from tensorflow.models.tutorials.rnn.ptb import reader#存在models了也可以導入了
參考https://blog.csdn.net/u013058751/article/details/80157020