ML computers tensorflow

From Interaction Station Wiki
Revision as of 13:43, 28 November 2022 by Annasa (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

General info

  • Install the package tensorflow-gpu for GPU acceleration.
  • For tensorflow-gpu <= 1.12 you need CUDA9.0 TF1.13,CUDA10.0)
  • For tensorflow-gpu >= 1.13 you need CUDA10.0
  • By default tensorflow installs the cpu version. For being sure the GPU is being used, run these lines with python3:
from tensorflow.python.client import device_lib  
print(device_lib.list_local_devices())
  • The GPU should appear as a device.

Setting up tensorflow-gpu on Ubuntu 16.04 for python3

  • Then we do:
pip3 install  tensorflow-gpu==1.2.0
  • If conflict with setuptools version
  • solution:
pip3 install --upgrade setuptools==41.0.0
sudo pip3 install --upgrade tensorflow-gpu==1.2.0
  • How to check the version installed:
pip3 show tensorflow-gpu
  • Problem: After installing tensorflow jupyter notebook was not working.
  • Solution:
pip3 uninstall pyzmq
pip3 install pyzmq
  • Problem: Error -> ImportError: No module named model_utils
  • Solution:
pip3 list
  • and installing the same version of tensorflow-estimator than of tensorflow-gpu:
pip3 uninstall tensorflow-estimator    
pip3 install tensorflow-estimator==1.14.0