Difference between revisions of "ML computers tensorflow"

From Interaction Station Wiki
Jump to navigation Jump to search
(Created page with " ==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 nee...")
 
 
(5 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
*For tensorflow-gpu <= 1.12 you need  CUDA9.0  TF1.13,CUDA10.0)
 
*For tensorflow-gpu <= 1.12 you need  CUDA9.0  TF1.13,CUDA10.0)
 
*For tensorflow-gpu >= 1.13 you need  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:
 
*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   
 
  from tensorflow.python.client import device_lib   
 
  print(device_lib.list_local_devices())
 
  print(device_lib.list_local_devices())
 
+
 
 
*The GPU should appear as a device.
 
*The GPU should appear as a device.
  
 
==Setting up tensorflow-gpu on Ubuntu 16.04 for python3==
 
==Setting up tensorflow-gpu on Ubuntu 16.04 for python3==
  
*First we install pip3:
+
*First we install pip3: [[ML computers python|python3 and pip3 installation]]
Link to wiki python
 
  
 
*Then we do:
 
*Then we do:
Line 41: Line 38:
 
  pip3 uninstall tensorflow-estimator     
 
  pip3 uninstall tensorflow-estimator     
 
  pip3 install tensorflow-estimator==1.14.0
 
  pip3 install tensorflow-estimator==1.14.0
 +
[[Category:AI & Machine Learning]]

Latest revision as of 13:43, 28 November 2022

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