安裝 TensorFlow 2
TensorFlow 已在下列 64 位元系統上測試並提供支援
|
|
# Requires the latest pippip install --upgrade pip
# Current stable release for CPU and GPUpip install tensorflow
# Or try the preview build (unstable)pip install tf-nightly
下載套件
使用 Python 的 pip 套件管理工具安裝 TensorFlow。
官方套件適用於 Ubuntu、Windows 和 macOS。
執行 TensorFlow 容器
TensorFlow Docker 映像檔已設定為執行 TensorFlow。Docker 容器會在虛擬環境中執行,是設定 GPU 支援最簡單的方式。
docker pull tensorflow/tensorflow:latest # Download latest stable image
docker run -it -p 8888:8888 tensorflow/tensorflow:latest-jupyter # Start Jupyter server
Google Colab:學習和使用 TensorFlow 的簡單方法
無需安裝,即可透過 Colaboratory (Google 研究專案,旨在協助推廣機器學習教育和研究) 直接在瀏覽器中執行TensorFlow 教學課程。這是一個 Jupyter Notebook 環境,無需設定即可使用,而且完全在雲端中執行。閱讀網誌文章。