【发布时间】:2017-12-31 07:34:52
【问题描述】:
我是 tensorflow 和 ssh 的新手。我想运行一个张量流模型,我只是使用 ssh 在我的大学服务器上构建的,因为我需要使用 gpu 来加速训练。我想问一下这是否需要服务器预先安装了 tensorflow 包。我使用的操作系统是macos。
【问题讨论】:
标签: python macos tensorflow
我是 tensorflow 和 ssh 的新手。我想运行一个张量流模型,我只是使用 ssh 在我的大学服务器上构建的,因为我需要使用 gpu 来加速训练。我想问一下这是否需要服务器预先安装了 tensorflow 包。我使用的操作系统是macos。
【问题讨论】:
标签: python macos tensorflow
简而言之,是的。如果服务器本身没有安装 TensorFlow,则无法在远程服务器上训练模型。您可以将其视为远程(您的机器)和电视(远程服务器)。
【讨论】:
您需要安装所需的软件包。你应该可以用 pip 做到这一点。在服务器上尝试以下命令:
pip install --user tensorflow
您可以使用 get-pip.py 安装 pip,如下所述: https://pip.pypa.io/en/stable/installing/
快速食谱:
#Gettin get-pip
wget -P ~/.local/lib https://bootstrap.pypa.io/get-pip.py
python ~/.local/lib/get-pip.py --user
#Adds /.local/bin to the global path variable and adds it to bashrc file
printf "\nPATH=~/.local/bin/:\$PATH" >> ~/.bashrc
#run bashrc, almost same effect as restarting terminal
source ~/.bashrc
【讨论】: