AI
Tensorflow
What is Tensorflow?
TensorFlow is an open-source machine learning library developed by Google. It is designed to be a flexible and scalable platform for building and training machine learning models. TensorFlow provides a wide range of tools and libraries for developing deep learning models, including neural networks, convolutional neural networks, and recurrent neural networks.
Install
> pip install tensorflow
Install with GPU support:
> pip install tensorflow-gpu
If you want to add Tensorflow to your project dependencies, you can add it to your requirements.txt file:
> echo "tensorflow" >> requirements.txt
# or
> pip freeze >> requirements.txt
Test the installation by importing TensorFlow in a Python script:
import tensorflow as tf
print(tf.version)
FAQ
NotOpenSSLWarning: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'.
Downgrade urllib3 to version 1.26.15:
(venv) pip install urllib3==1.26.15