🌍 Python · subject
Python TensorFlow Syllabus
Every chapter and topic of TensorFlow examined in Python — 6 chapters, 19 topics and 47 sub-topics, plus 51 flashcards written against it.
TensorFlow syllabus — full chapter and topic list
Expand any chapter to see its topics and sub-topics. This is the whole examinable outline for TensorFlow in Python, not a summary of it.
-
Introduction to TensorFlow
2 topics- What is TensorFlow?
- History of TensorFlow
- Applications of TensorFlow
- Setting Up TensorFlow
- Installing TensorFlow
- Setting Up Virtual Environments
- TensorFlow 2.x vs TensorFlow 1.x
- What is TensorFlow?
-
Basic Concepts
3 topics- Tensors
- Tensor Types
- Tensor Operations
- Graphs and Sessions
- Building a Computational Graph
- Running a Graph in a Session
- Variables and Placeholders
- Creating Variables
- Using Placeholders
- Variable Scope
- Tensors
-
Core TensorFlow
4 topics- Data Manipulation
- Loading Data with TensorFlow
- Data Preprocessing
- Data Augmentation
- Building Models
- Sequential API
- Functional API
- Sub-classing API
- Training Models
- Compilation and Optimizers
- Loss Functions
- Metrics
- Callbacks
- Evaluation and Prediction
- Evaluating a Model
- Making Predictions
- Data Manipulation
-
Advanced Concepts
4 topics- Custom Training Loops
- Using GradientTape
- Custom Training Step
- Distributed Training
- Data Parallelism
- Model Parallelism
- Using TPUs
- TensorFlow Serving
- Model Export
- Serving with TensorFlow Serving
- TensorFlow Lite
- Model Conversion
- Optimizing Models
- Deploying on Mobile
- Custom Training Loops
-
Specialized Libraries
3 topics- TensorFlow Extended (TFX)
- Pipeline Components
- Model Analysis
- Model Validation
- TensorFlow Hub
- Using Pretrained Models
- Sharing Models
- TensorFlow.js
- Running Models in the Browser
- Training Models in the Browser
- TensorFlow Extended (TFX)
-
Practical Projects
3 topics- Image Classification
- Building a CNN
- Transfer Learning
- Natural Language Processing
- Text Classification
- Sequence-to-Sequence Models
- Time Series Forecasting
- RNNs and LSTMs
- Attention Mechanisms
- Image Classification
TensorFlow flashcards for Python
22 of 51 cards from the TensorFlow deck — real questions with worked answers.
What is TensorFlow?
TensorFlow is an open-source, end-to-end machine learning and deep learning framework developed by the Google Brain team (released 2015). It performs numerical computation using data flow graphs, where nodes are operations and edges are multidimensional data arrays (tensors).
Why is TensorFlow named 'TensorFlow'?
The name combines 'Tensor' (the multidimensional arrays that hold the data) and 'Flow' (the movement of these tensors through a computational graph of operations). It literally describes tensors flowing through a graph.
What major architectural change did TensorFlow 2.x introduce over TensorFlow 1.x?
TensorFlow 2.x made eager execution the default (operations run immediately, imperatively) instead of the 1.x define-then-run static graph with explicit sessions. It also adopted Keras (tf.keras) as the official high-level API and removed the need for tf.Session and placeholders.
How do you install the CPU version of TensorFlow via pip?
Run $\texttt{pip install tensorflow}$. The same package includes GPU support on Linux; for GPU you additionally need compatible NVIDIA CUDA and cuDNN libraries installed.
How do you import TensorFlow and check its version in Python?
import tensorflow as tf, then print(tf.__version__). The conventional alias is tf.
What is a tensor in TensorFlow?
A tensor is a multidimensional array (a generalization of scalars, vectors, and matrices) with a uniform data type (dtype) and a shape. It is the fundamental unit of data in TensorFlow.
Define rank, shape, and dtype of a tensor.
Rank is the number of dimensions (axes) of the tensor. Shape is a tuple giving the size along each axis. Dtype is the data type of every element (e.g., float32, int32, string).
What are the ranks of a scalar, vector, matrix, and 3D tensor?
Scalar = rank 0, vector = rank 1, matrix = rank 2, and a 3D tensor = rank 3. Rank equals the number of indices needed to identify an element.
What is the key difference between tf.constant and tf.Variable?
tf.constant creates an immutable tensor whose value cannot change. tf.Variable creates a mutable tensor whose value can be updated (via assign), used to store trainable model parameters like weights and biases.
In TensorFlow 1.x, what were Graphs and Sessions?
A Graph was a static dataflow definition of operations and tensors built before execution. A Session was the runtime object that allocated resources and actually executed (ran) parts of the graph to compute tensor values via sess.run().
What is a computational (dataflow) graph in TensorFlow?
A directed graph where nodes represent operations (ops) and edges represent the tensors that flow between them. It captures the dependencies of a computation, enabling optimization, parallelism, and portability across devices.
In TensorFlow 2.x, how do you convert a Python function into a graph for performance?
Decorate the function with @tf.function. This uses AutoGraph to trace the Python code into a static tf.Graph (a ConcreteFunction), giving the speed and portability of graph execution while keeping eager-style code.
What is a tf.placeholder and is it used in TensorFlow 2.x?
In TF 1.x a tf.placeholder was a node that received external input fed at session run time via a feed_dict. In TensorFlow 2.x placeholders are removed; you pass data directly as function arguments thanks to eager execution.
How do you create and update a tf.Variable's value?
Create with v = tf.Variable(initial_value). Update with methods like v.assign(new_value), v.assign_add(delta), or v.assign_sub(delta). Direct Python assignment with = would rebind the name, not update the tensor.
What is the tf.data API used for?
The tf.data API builds efficient, scalable input pipelines. tf.data.Dataset represents a sequence of elements and supports chained transformations like map, batch, shuffle, repeat, and prefetch for feeding data to models.
What do the Dataset operations batch(), shuffle(), and prefetch() do?
batch(n) groups consecutive elements into batches of size n. shuffle(buffer) randomly reorders elements using a buffer. prefetch overlaps data preprocessing with model execution to reduce input latency (often prefetch(tf.data.AUTOTUNE)).
What is broadcasting in TensorFlow?
Broadcasting automatically expands a smaller tensor's shape to match a larger one in element-wise operations, without copying data, when their dimensions are compatible (each dimension equal or one of them is 1). Example: adding a vector to every row of a matrix.
What are the two main APIs in tf.keras for building models?
The Sequential API (a linear stack of layers, via tf.keras.Sequential) and the Functional API (tf.keras.Model with explicit input/output tensors), which supports multiple inputs/outputs and non-linear topologies. Subclassing tf.keras.Model is a third, most flexible option.
Write the basic structure for building a Sequential model in Keras.
model = tf.keras.Sequential([tf.keras.layers.Dense(64, activation='relu'), tf.keras.layers.Dense(10, activation='softmax')]). Layers are passed as a list and applied in order.
What three things must you specify in model.compile()?
An optimizer (e.g., 'adam'), a loss function (e.g., 'categorical_crossentropy'), and a list of metrics (e.g., ['accuracy']) to monitor during training and evaluation.
What does a Dense (fully connected) layer compute?
It computes $y = \sigma(Wx + b)$, where $W$ is the weight matrix, $b$ the bias vector, $x$ the input, and $\sigma$ an activation function applied element-wise.
What is the ReLU activation function?
The Rectified Linear Unit is $f(x) = \max(0, x)$. It outputs the input if positive and 0 otherwise, introducing non-linearity while being cheap to compute and helping mitigate the vanishing gradient problem.
Planning TensorFlow for Python
TensorFlow is about 8% of the Python syllabus by topic count — 19 of 242 topics, spread over 6 chapters. At roughly 45 minutes per topic plus 12 minutes per sub-topic, a first pass runs to about 25 hours.
The heaviest chapters are Core TensorFlow (4 topics), Advanced Concepts (4 topics), Basic Concepts (3 topics) . Front-load those while your energy is high; the short chapters are better revision filler later.
Work top-down: read the chapter, then tick topics off individually rather than marking the whole chapter done. Sub-topics are where silent gaps hide.
TensorFlow (Python) FAQ
What is in the Python TensorFlow syllabus?
TensorFlow is split into 6 chapters — Introduction to TensorFlow, Basic Concepts, Core TensorFlow, Advanced Concepts, Specialized Libraries and Practical Projects, containing 19 topics and 47 sub-topics in total.
How is TensorFlow structured in the Python syllabus?
6 chapters. TensorFlow accounts for about 8% of the topics in the whole Python syllabus (19 of 242).
How long should I spend on TensorFlow for Python?
Budget around 25 hours for a first pass through TensorFlow — about 45 minutes per topic plus 12 minutes per sub-topic across its 19 topics. Add revision cycles on top.
Are there flashcards for Python TensorFlow?
Yes — a 51-card TensorFlow deck. Sample cards are printed on this page, and the full deck is free in the Examius app with spaced repetition scheduling.