Install Tensorflow with GPU on Windows 10
Last updated
Was this helpful?
Last updated
Was this helpful?
Install Python 3.6.6
Install Virtualenv Package and Create Virtual Environment
ทำการดาวน์โหลด NVIDIA GPU Driver 410.x ขึ้นไป สำหรับ CUDA Toolkit 9.0 โดยเลือกเวอร์ชั่น NVIDIA ให้ตรงกับที่ใช้งาน ซึ่งผมใช้ Geforce GTX 1660 Ti อย่าลืมเลือกให้ตรงกับระบบปฏิบัติการ Windows 10 64-bit กรณีที่เป็น Windows ให้เลือก Driver Type เป็น
คลิก OK
เลือก NVIDIA Graphics Driver and Geforce Experience แล้วคลิก Agree and Continue
เลือก Express แล้วคลิก Next
เลือก Create Desktop Shortcut แล้วคลิก Restart Now
ทำการดาวน์โหลด CUDA Toolkit 9.0 อย่าลืมเลือกให้ตรงกับระบบปฏิบัติการ Windows 10 64-bit
คลิก Agree and Continue
เลือก Express แล้วคลิก Next
เลือก I understand แล้วคลิก Next
คลิก Next
คลิก Close
ทำการดาวน์โหลด cuDNN 7.6.3 สำหรับ CUDA 9.0 อย่าลืมเลือกให้ตรงกับระบบปฏิบัติการ Windows 10 64-bit โดยสถาปัตยกรรมแบบใหม่ Volta สามารถ Train ข้อมูลได้เร็วกว่าแบบเดิมซึ่งเป็นแบบ Pascal ถึง 3 เท่า
จากนั้นทำการคัดลอกไฟล์ cudnn64_7.dll ไปไว้ใน C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin
จากนั้นทำการคัดลอกไฟล์ cudnn.h ไปไว้ใน C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\include
จากนั้นทำการคัดลอกไฟล์ cudnn.lib ไปไว้ใน C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\lib\x64
ทำการรัน sysdm.cpl เลือก Advanced แล้วคลิก Environment Variables
เลือก Path แล้วคลิก Edit User variables
ทำการระบุ Path ของ CUDA เป็น C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin
ทำการสร้าง Virtual Environment
ติดตั้ง Tensorflow ( GPU )
ทำการสร้างไฟล์ tensorflow-begin.py
ทำการรัน tensorflow-begin.py
ลองดูผลลัพธ์
อ่านเพิ่มเติม :