Builds ที่กำหนดเองสำหรับ TensorFlow พร้อมการเพิ่มประสิทธิภาพแพลตฟอร์มรวมถึง SSE, AVX และ FMA หากคุณเห็นข้อความดังต่อไปนี้ด้วย pip install tensorflow คุณมาถูกที่แล้ว
The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
or:
Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
ล้อเหล่านี้ถูกสร้างขึ้นเพื่อใช้กับ Tinymind ซึ่งเป็นแพลตฟอร์มการเรียนรู้ของเครื่องคลาวด์ หากคุณต้องการติดตั้งในกล่อง Linux ของคุณเอง (Ubuntu 16.04 LTS) คุณสามารถทำได้ด้วย:
# RELEASE is the git tag like tf1.1-cpu. WHEEL is the full wheel name.
pip --no-cache-dir install https://github.com/mind/wheels/releases/download/{RELEASE}/{WHEEL}รายการล้อทั้งหมดสามารถพบได้ในหน้ารุ่น
คลิกที่ลิงค์ด้านล่างเพื่อข้ามไปยังรุ่นที่เฉพาะเจาะจง อีกครั้งพวกเขาถูกสร้างขึ้นสำหรับ Ubuntu 16.04 LTS เว้นแต่จะระบุไว้เป็นอย่างอื่น
| TF | สร้าง |
|---|---|
| 1.1 | CPU, GPU |
| 1.2 | CPU, GPU (Python 3.6 เท่านั้น) |
| 1.2.1 | CPU, GPU |
| 1.3 | CPU, GPU กับ MPI |
| 1.3.1 | CPU, CPU Debug, GPU, GPU กับ MPI |
| 1.4 | CPU, CPU DEBUG, CPU MACOS, GPU (CUDA 8, CUDA 9 สำหรับการคำนวณ 3.7, CUDA 9 สำหรับการคำนวณ 3.7/6.0/7.0, CUDA 9 ทั่วไป, CUDA 9 โดยไม่มี MKL) |
| 1.4.1 | CPU, GPU (CUDA 8, CUDA 9, CUDA 9.1) |
| 1.5 | CPU, GPU (CUDA 9, CUDA 9 โดยไม่มี MKL, CUDA 9.1, CUDA 9.1 โดยไม่มี MKL) |
| 1.6 | CPU, GPU (CUDA 9.1, CUDA 9.1 ไม่มี MKL) |
| 1.7 | CPU, GPU (CUDA 9, CUDA 9.1, CUDNN 7.1) |
โปรดทราบว่าเครื่องของคุณจะต้องมี Intel CPU ที่ค่อนข้างใหม่ (และ Nvidia GPU หากคุณใช้ GPU รุ่น) เข้ากันได้กับล้อด้านล่าง หากฮาร์ดแวร์ไม่ทันสมัยล้อจะไม่ทำงาน
ล้อสำหรับ tensorflow 1.4.1 ขึ้นไปมีการสนับสนุนสำหรับ GCP, S3 และ Hadoop การรวบรวมธงรวมถึง:
--config=opt --config=cuda --cxxopt=-D_GLIBCXX_USE_CXX11_ABI=0 --copt=-mavx --copt=-msse4.1 --copt=-msse4.2 --copt=-mavx2 --copt=-mfma --copt=-mfpmath=both
ล้อที่คุณต้องการส่วนใหญ่จะมีอยู่ด้านล่าง ต้องการอะไรหรือล้อไม่ได้ผลสำหรับคุณ? ยื่นปัญหา (น่าเสียดายที่เราจะไม่สามารถรองรับคำขอสำหรับ Windows Wheels ได้เนื่องจากเราไม่มีเครื่องจักร Windows ด้วยตัวเอง)
| รุ่น | งูหลาม | โค้ง | การเชื่อมโยง |
|---|---|---|---|
| 1.1 | 2.7 | ซีพียู | https://github.com/mind/wheels/releases/download/tf1.1-cpu/tensorflow-1.1.0-cp27-cp27mu-linux_x86_64.whl |
| 1.1 | 3.5 | ซีพียู | https://github.com/mind/wheels/releases/download/tf1.1-cpu/tensorflow-1.1.0-cp35-cp35m-linux_x86_64.whl |
| 1.1 | 3.6 | ซีพียู | https://github.com/mind/wheels/releases/download/tf1.1-cpu/tensorflow-1.1.0-cp36-cp36m-linux_x86_64.whl |
| 1.1 | 2.7 | GPU | https://github.com/mind/wheels/releases/download/tf1.1-gpu/tensorflow-1.1.0-cp27-cp27mu-linux_x86_64.whl |
| 1.1 | 3.5 | GPU | https://github.com/mind/wheels/releases/download/tf1.1-gpu/tensorflow-1.1.0-cp35-cp35m-linux_x86_64.whl |
| 1.1 | 3.6 | GPU | https://github.com/mind/wheels/releases/download/tf1.1-gpu/tensorflow-1.1.0-cp36-cp36m-linux_x86_64.whl |
| 1.2 | 2.7 | ซีพียู | https://github.com/mind/wheels/releases/download/tf1.2-cpu/tensorflow-1.2.0-cp27-cp27mu-linux_x86_64.whl |
| 1.2 | 3.5 | ซีพียู | https://github.com/mind/wheels/releases/download/tf1.2-cpu/tensorflow-1.2.0-cp35-cp35m-linux_x86_64.whl |
| 1.2 | 3.6 | ซีพียู | https://github.com/mind/wheels/releases/download/tf1.2-cpu/tensorflow-1.2.0-cp36-cp36m-linux_x86_64.whl |
| 1.2 | 3.6 | GPU | https://github.com/mind/wheels/releases/download/tf1.2-gpu/tensorflow-1.2.0-cp36-cp36m-linux_x86_64.whl |
| 1.2.1 | 2.7 | ซีพียู | https://github.com/mind/wheels/releases/download/tf1.2.1-cpu/tensorflow-1.2.1-cp27-cp27mu-linux_x86_64.whl |
| 1.2.1 | 3.5 | ซีพียู | https://github.com/mind/wheels/releases/download/tf1.2.1-cpu/tensorflow-1.2.1-cp35-cp35m-linux_x86_64.whl |
| 1.2.1 | 3.6 | ซีพียู | https://github.com/mind/wheels/releases/download/tf1.2.1-cpu/tensorflow-1.2.1-cp36-cp36m-linux_x86_64.whl |
| 1.2.1 | 2.7 | GPU | https://github.com/mind/wheels/releases/download/tf1.2.1-gpu/tensorflow-1.2.1-cp27-cp27mu-linux_x86_64.whl |
| 1.2.1 | 3.5 | GPU | https://github.com/mind/wheels/releases/download/tf1.2.1-gpu/tensorflow-1.2.1-cp35-cp35m-linux_x86_64.whl |
| 1.2.1 | 3.6 | GPU | https://github.com/mind/wheels/releases/download/tf1.2.1-gpu/tensorflow-1.2.1-cp36-cp36m-linux_x86_64.whl |
| 1.3 | 2.7 | ซีพียู | https://github.com/mind/wheels/releases/download/tf1.3-cpu/tensorflow-1.3.0-cp27-cp27mu-linux_x86_64.whl |
| 1.3 | 3.5 | ซีพียู | https://github.com/mind/wheels/releases/download/tf1.3-cpu/tensorflow-1.3.0-cp35-cp35m-linux_x86_64.whl |
| 1.3 | 3.6 | ซีพียู | https://github.com/mind/wheels/releases/download/tf1.3-cpu/tensorflow-1.3.0-cp36-cp36m-linux_x86_64.whl |
| 1.3 | 2.7 | GPU | https://github.com/mind/wheels/releases/download/tf1.3-gpu/tensorflow-1.3.0-cp27-cp27mu-linux_x86_64.whl |
| 1.3 | 3.5 | GPU | https://github.com/mind/wheels/releases/download/tf1.3-gpu/tensorflow-1.3.0-cp35-cp35m-linux_x86_64.whl |
| 1.3 | 3.6 | GPU | https://github.com/mind/wheels/releases/download/tf1.3-gpu/tensorflow-1.3.0-cp36-cp36m-linux_x86_64.whl |
| 1.3.1 | 2.7 | ซีพียู | https://github.com/mind/wheels/releases/download/tf1.3.1-cpu/tensorflow-1.3.1-cp27-cp27mu-linux_x86_64.whl |
| 1.3.1 | 3.5 | ซีพียู | https://github.com/mind/wheels/releases/download/tf1.3.1-cpu/tensorflow-1.3.1-cp35-cp35m-linux_x86_64.whl |
| 1.3.1 | 3.6 | ซีพียู | https://github.com/mind/wheels/releases/download/tf1.3.1-cpu/tensorflow-1.3.1-cp36-cp36m-linux_x86_64.whl |
| 1.3.1 | 2.7 | GPU | https://github.com/mind/wheels/releases/download/tf1.3.1-gpu/tensorflow-1.3.1-cp27-cp27mu-linux_x86_64.whl |
| 1.3.1 | 3.5 | GPU | https://github.com/mind/wheels/releases/download/tf1.3.1-gpu/tensorflow-1.3.1-cp35-cp35m-linux_x86_64.whl |
| 1.3.1 | 3.6 | GPU | https://github.com/mind/wheels/releases/download/tf1.3.1-gpu/tensorflow-1.3.1-cp36-cp36m-linux_x86_64.whl |
| 1.4 | 2.7 | ซีพียู | https://github.com/mind/wheels/releases/download/tf1.4-cpu/tensorflow-1.4.0-cp27-cp27mu-linux_x86_64.whl |
| 1.4 | 3.5 | ซีพียู | https://github.com/mind/wheels/releases/download/tf1.4-cpu/tensorflow-1.4.0-cp35-cp35m-linux_x86_64.whl |
| 1.4 | 3.6 | ซีพียู | https://github.com/mind/wheels/releases/download/tf1.4-cpu/tensorflow-1.4.0-cp36-cp36m-linux_x86_64.whl |
| 1.4 | 2.7 | GPU | https://github.com/mind/wheels/releases/download/tf1.4-gpu/tensorflow-1.4.0-cp27-cp27mu-linux_x86_64.whl |
| 1.4 | 3.5 | GPU | https://github.com/mind/wheels/releases/download/tf1.4-gpu/tensorflow-1.4.0-cp35-cp35m-linux_x86_64.whl |
| 1.4 | 3.6 | GPU | https://github.com/mind/wheels/releases/download/tf1.4-gpu/tensorflow-1.4.0-cp36-cp36m-linux_x86_64.whl |
| 1.4.1 | 2.7 | ซีพียู | https://github.com/mind/wheels/releases/download/tf1.4.1-cpu/tensorflow-1.4.1-cp27-cp27mu-linux_x86_64.whl |
| 1.4.1 | 3.5 | ซีพียู | https://github.com/mind/wheels/releases/download/tf1.4.1-cpu/tensorflow-1.4.1-cp35-cp35m-linux_x86_64.whl |
| 1.4.1 | 3.6 | ซีพียู | https://github.com/mind/wheels/releases/download/tf1.4.1-cpu/tensorflow-1.4.1-cp36-cp36m-linux_x86_64.whl |
| 1.4.1 | 2.7 | GPU | https://github.com/mind/wheels/releases/download/tf1.4.1-gpu/tensorflow-1.4.1-cp27-cp27mu-linux_x86_64.whl |
| 1.4.1 | 3.5 | GPU | https://github.com/mind/wheels/releases/download/tf1.4.1-gpu/tensorflow-1.4.1-cp35-cp35m-linux_x86_64.whl |
| 1.4.1 | 3.6 | GPU | https://github.com/mind/wheels/releases/download/tf1.4.1-gpu/tensorflow-1.4.1-cp36-cp36m-linux_x86_64.whl |
| 1.5 | 2.7 | ซีพียู | https://github.com/mind/wheels/releases/download/tf1.5-cpu/tensorflow-1.5.0-cp27-cp27mu-linux_x86_64.whl |
| 1.5 | 3.5 | ซีพียู | https://github.com/mind/wheels/releases/download/tf1.5-cpu/tensorflow-1.5.0-cp35-cp35m-linux_x86_64.whl |
| 1.5 | 3.6 | ซีพียู | https://github.com/mind/wheels/releases/download/tf1.5-cpu/tensorflow-1.5.0-cp36-cp36m-linux_x86_64.whl |
| 1.5 | 2.7 | GPU | https://github.com/mind/wheels/releases/download/tf1.5-gpu/tensorflow-1.5.0-cp27-cp27mu-linux_x86_64.whl |
| 1.5 | 3.5 | GPU | https://github.com/mind/wheels/releases/download/tf1.5-gpu/tensorflow-1.5.0-cp35-cp35m-linux_x86_64.whl |
| 1.5 | 3.6 | GPU | https://github.com/mind/wheels/releases/download/tf1.5-gpu/tensorflow-1.5.0-cp36-cp36m-linux_x86_64.whl |
| 1.6 | 2.7 | ซีพียู | https://github.com/mind/wheels/releases/download/tf1.6-cpu/tensorflow-1.6.0-cp27-cp27mu-linux_x86_64.whl |
| 1.6 | 3.5 | ซีพียู | https://github.com/mind/wheels/releases/download/tf1.6-cpu/tensorflow-1.6.0-cp35-cp35m-linux_x86_64.whl |
| 1.6 | 3.6 | ซีพียู | https://github.com/mind/wheels/releases/download/tf1.6-cpu/tensorflow-1.6.0-cp36-cp36m-linux_x86_64.whl |
| 1.6 | 2.7 | GPU | https://github.com/mind/wheels/releases/download/tf1.6-gpu-cuda91/tensorflow-1.6.0-cp27-cp27mu-linux_x86_64.whl |
| 1.6 | 3.5 | GPU | https://github.com/mind/wheels/releases/download/tf1.6-gpu-cuda91/tensorflow-1.6.0-cp35-cp35m-linux_x86_64.whl |
| 1.6 | 3.6 | GPU | https://github.com/mind/wheels/releases/download/tf1.6-gpu-cuda91/tensorflow-1.6.0-cp36-cp36m-linux_x86_64.whl |
ส่วนนี้มีเคล็ดลับสำหรับการดีบักการตั้งค่าของคุณ แม้ว่าอย่างจริงจังลองใช้ tinymind out และคุณไม่จำเป็นต้องเสียเวลาในการดีบักอีกครั้ง นอกจากนี้เรายังมีภาพนักเทียบท่าที่คุณสามารถใช้กับเครื่องจักรของคุณเอง หากส่วนนี้ไม่สามารถแก้ปัญหาของคุณได้ให้แน่ใจว่าได้ยื่นปัญหา
รุ่น Tensorflow ที่แตกต่างกันรองรับ/ต้องการ cuda ที่แตกต่างกัน:
| TF | คนขี้เกียจ | คนขี้เกียจ | ความสามารถในการคำนวณ |
|---|---|---|---|
| 1.1, 1.2 | 8.0 | 5.1 | 3.7 (K80) |
| 1.2.1-1.3.1 | 8.0 | 6.0 | 3.7 |
| 1.4 | 8.0/9.0 | 6.0/7.0 | 3.7, 6.0 (P100), 7.0 (V100) |
| 1.4.1 | 8.0/9.0/9.1 | 6.0/7.0 | 3.7, 6.0, 7.0 |
| 1.5 | 9.0/9.1 | 7.0 | 3.7, 6.0, 7.0 |
| 1.6 | 9.1 | 7.0 | 3.7, 6.0, 7.0 |
| 1.7 | 9.0/9.1 | 7.0/7.1 | 3.7, 6.0, 7.0 |
TensorFlow <1.4 ไม่ทำงานกับ CUDA 9 ซึ่งเป็นเวอร์ชันปัจจุบัน แทนที่จะ sudo apt-get install cuda คุณต้องทำการติดตั้ง sudo apt-get install cuda-8-0 Cuda 8 ตัวแปรของ Tensorflow 1.4 ไปกับ Cudnn 6.0 และ Cuda 9.x ตัวแปรไปกับ Cudnn 7.x
# Install CUDA 8
curl -O http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
sudo apt-get update
sudo apt-get install cuda-8-0
# Install CUDA 9
curl -O http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.0.176-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1604_9.0.176-1_amd64.deb
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
sudo apt-get update
sudo apt-get install cudaตรวจสอบให้แน่ใจว่าตั้งค่าตัวแปรสภาพแวดล้อมที่เกี่ยวข้องกับ CUDA อย่างถูกต้อง:
echo ' export CUDA_HOME=/usr/local/cuda ' >> ~ /.bashrc
echo ' export PATH=$PATH:$CUDA_HOME/bin ' >> ~ /.bashrc
echo ' export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CUDA_HOME/lib64 ' >> ~ /.bashrc
. ~ /.bashrcดาวน์โหลด cudnn ที่ถูกต้องและติดตั้งดังนี้:
# The cuDNN tar file.
tar xzvf cudnn-9.0-linux-x64-v7.0.tgz
sudo cp cuda/lib64/ * /usr/local/cuda/lib64/
sudo cp cuda/include/cudnn.h /usr/local/cuda/include/ หายไปห้องสมุด libcupti ? ติดตั้งและเพิ่มลงใน PATH ของคุณ
sudo apt-get install libcupti-dev
echo ' export LD_LIBRARY_PATH=/usr/local/cuda/extras/CUPTI/lib64:$LD_LIBRARY_PATH ' >> ~ /.bashrcล้อบางตัวรองรับ tensorrt ในการติดตั้ง Tensorrt ให้ดาวน์โหลดก่อนจากเว็บไซต์ของ Nvidia แล้วเรียกใช้:
sudo dpkg -i nv-tensorrt-repo-ubuntu1604-ga-cuda9.0-trt3.0.4-20180208_1-1_amd64.deb
sudo apt-get update
sudo apt-get install tensorrtMKL เป็นห้องสมุดเคอร์เนลการเรียนรู้อย่างลึกซึ้งของ Intel ซึ่งทำให้การฝึกอบรม Neural Nets ใน CPU เร็วขึ้นมาก หากคุณไม่มีให้ติดตั้งดังต่อไปนี้:
# If you don't have cmake
sudo apt install cmake
git clone https://github.com/01org/mkl-dnn.git
cd mkl-dnn/scripts && ./prepare_mkl.sh && cd ..
mkdir -p build && cd build && cmake .. && make
sudo make install
echo ' export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib ' >> ~ /.bashrcโปรดทราบว่า Ubuntu 16.04 LTS เป็นสภาพแวดล้อมที่ตั้งใจไว้ หากคุณมีระบบปฏิบัติการเก่าคุณอาจพบปัญหาเกี่ยวกับรุ่น GLIBC เก่า คุณอาจต้องการตรวจสอบการอภิปรายที่นี่เพื่อดูว่าพวกเขาจะช่วยหรือไม่
ใช้ล้อพร้อมรองรับ MPI? อย่าลืมเรียก sudo apt-get install mpich