安裝 TensorFlow Graphics

穩定版本

TensorFlow Graphics 仰賴 TensorFlow 1.13.1 或以上版本。同時也支援 TensorFlow 的每夜版 (tf-nightly)。

若要從 PyPI 安裝最新的 CPU 版本,請執行下列指令

# Installing with the `--upgrade` flag ensures you'll get the latest version.
pip install --upgrade tensorflow-graphics

若要安裝最新的 GPU 版本,請執行下列指令

# Installing with the `--upgrade` flag ensures you'll get the latest version.
pip install --upgrade tensorflow-graphics-gpu

如需其他安裝協助、安裝先決條件指南,以及 (選擇性) 設定虛擬環境,請參閱 TensorFlow 安裝指南

從來源安裝 - macOS/Linux

您也可以執行下列指令從來源安裝

git clone https://github.com/tensorflow/graphics.git
sh build_pip_pkg.sh
pip install --upgrade dist/*.whl

安裝選用套件 - Linux

若要使用 TensorFlow Graphics EXR 資料載入器,需要安裝 OpenEXR。這可以透過執行下列指令來完成

sudo apt-get install libopenexr-dev
pip install --upgrade OpenEXR