All Guides
TensorFlow Setup
Install the Google TensorFlow machine learning library and create your first model.
Advanced30 min
Setup Steps
1. Python 3.9-3.12 is required
2. Install TensorFlow:
pip install tensorflow3. For GPU support (NVIDIA CUDA required):
pip install tensorflow[and-cuda]4. Verify installation:
python3 -c "import tensorflow as tf; print(tf.__version__)"5. GPU check:
python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"6. Simple model example:
python
import tensorflow as tf
from tensorflow import keras
model = keras.Sequential([
keras.layers.Dense(128, activation='relu', input_shape=(784,)),
keras.layers.Dropout(0.2),
keras.layers.Dense(10, activation='softmax')
])
model.compile(optimizer='adam',
loss='sparse_categorical_crossentropy',
metrics=['accuracy'])
# Train with MNIST dataset
(x_train, y_train), (x_test, y_test) = keras.datasets.mnist.load_data()
x_train = x_train.reshape(-1, 784) / 255.0
model.fit(x_train, y_train, epochs=5)7. Save model:
model.save('model.keras')Related Guides
Python Setup and pip
Install the Python programming language and pip package manager.
Jupyter Notebook Setup
Install Jupyter Notebook and use the interactive Python development environment.
PyTorch Setup
Install the Meta PyTorch deep learning library and learn basic usage.
Conda/Miniconda Setup
Install the Miniconda package and environment manager. Isolate Python environments.