TensorFlow: Difference between revisions

222 bytes removed ,  12 August 2022
Line 23: Line 23:


===Install TF1===
===Install TF1===
The last official version of TensorFlow v1 is 1.15. This version does not work on RTX 3000+ GPUs. Your code will run but output bad results.<br>
If you need TensorFlow v1, see [https://github.com/NVIDIA/tensorflow nvidia-tensorflow].
<pre>
<pre>
conda install tensorflow-gpu=1.15
pip install nvidia-pyindex
pip install nvidia-tensorflow
</pre>
</pre>
;Notes
* Conda will automatically install a compatible cuda and cudnn into the cuda environment. Your host OS only needs to have a sufficiently new version of nvidia drivers installed.
* Sometimes, I get <code>CUDNN_STATUS_INTERNAL_ERROR</code>. This is fixed by setting the environment variable <code>TF_FORCE_GPU_ALLOW_GROWTH=true</code> in my conda env. See [https://stackoverflow.com/questions/46826497/conda-set-ld-library-path-for-env-only Add env variables to conda env]


==Usage (TF2)==
==Usage (TF2)==