您好,登錄后才能下訂單哦!
這篇文章給大家分享的是有關TensorFlow源代碼編譯構建安裝包的示例分析的內容。小編覺得挺實用的,因此分享給大家做個參考,一起跟隨小編過來看看吧。
git clone https://github.com/tensorflow/tensorflow.gitcd tensorflow
apt install curl gnupg curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor > bazel.gpg mv bazel.gpg /etc/apt/trusted.gpg.d/ echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
pip install six numpy wheel setuptools mock 'future>=0.17.1' pip install keras_applications --no-deps pip install keras_preprocessing --no-deps
./configure
Please specify the location of python. [Default is /root/miniconda3/envs/ray/bin/python3]:
Found possible Python library paths: /root/miniconda3/envs/ray/lib/python3.8/site-packages Please input the desired Python library path to use. Default is [/root/miniconda3/envs/ray/lib/python3.8/site-packages]
Do you wish to build TensorFlow with ROCm support? [y/N]: N
Do you wish to build TensorFlow with CUDA support? [y/N]: N
Do you wish to download a fresh release of clang? (Experimental) [y/N]: N
Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is -march=native -Wno-sign-compare]:
Would you like to interactively configure ./WORKSPACE for Android builds? [y/N]: N
bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package
./bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
pip install tensorflow-2.5.0-cp38-cp38-linux_x86_64.whl
感謝各位的閱讀!關于“TensorFlow源代碼編譯構建安裝包的示例分析”這篇文章就分享到這里了,希望以上內容可以對大家有一定的幫助,讓大家可以學到更多知識,如果覺得文章不錯,可以把它分享出去讓更多的人看到吧!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。