1. 程式人生 > >anaconda安裝的TensorFlow版本沒有model這個模組

anaconda安裝的TensorFlow版本沒有model這個模組

一、採用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