Golang Edition Tensorflow 설치 레코드

1634 단어 GoLearning

잔말 말고 바로 코드.

mkdir ~/.pip
echo "[global]
      index-url = https://pypi.douban.com/simple" > ~/.pip/pip.conf
sudo pip install --upgrade pip
sudo pip install --upgrade scipy numpy scikit-learn
go get -d github.com/tensorflow/tensorflow/tensorflow/go
sudo add-apt-repository ppa:webupd8team/java
echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
curl https://storage.googleapis.com/bazel-apt/doc/apt-key.pub.gpg | sudo apt-key add -
sudo apt-get update && sudo apt-get install oracle-java8-installer bazel
cd ${GOPATH}/src/github.com/tensorflow/tensorflow
./configure
bazel build --config opt //tensorflow:libtensorflow.so
sudo cp ${GOPATH}/src/github.com/tensorflow/tensorflow/bazel-bin/tensorflow/libtensorflow.so /usr/local/lib
sudo ldconfig
go test github.com/tensorflow/tensorflow/tensorflow/go

물론 구체적인 문제는 구체적으로 분석해야 하며, 문제가 있으면 나에게 메시지를 남겨도 된다.

좋은 웹페이지 즐겨찾기