TensorFlow: Difference between revisions
| (4 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
==Install== | ==Install== | ||
===Install TF2=== | ===Install TF2=== | ||
See https://www.tensorflow.org/install/pip | |||
Install tensorflow and [https://www.tensorflow.org/addons/overview tensorflow-addons] | Install tensorflow and [https://www.tensorflow.org/addons/overview tensorflow-addons] | ||
<pre> | <pre> | ||
pip install tensorflow-addons | pip install tensorflow-addons | ||
</pre> | </pre> | ||
| Line 23: | Line 18: | ||
===Install TF1=== | ===Install TF1=== | ||
The last official version of TensorFlow v1 is 1.15. This version does not work on RTX 3000+ (Ampere) 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> | ||
pip install nvidia-pyindex | |||
pip install nvidia-tensorflow | |||
</pre> | </pre> | ||
==Usage (TF2)== | ==Usage (TF2)== | ||
| Line 35: | Line 29: | ||
This is using the Keras API in tensorflow.keras. | This is using the Keras API in tensorflow.keras. | ||
===Keras Pipeline=== | ===Keras Pipeline=== | ||
[https://www.tensorflow.org/api_docs/python/tf/keras/Model tf.keras.Model] | |||
The general pipeline using Keras is: | The general pipeline using Keras is: | ||
* Define a model, typically using [https://www.tensorflow.org/api_docs/python/tf/keras/Sequential tf.keras.Sequential] | * Define a model, typically using [https://www.tensorflow.org/api_docs/python/tf/keras/Sequential tf.keras.Sequential] | ||