TensorFlow Cheat Sheet 2026

The 30 highest-yield TensorFlow facts, distilled from real exam questions. Print it, save it as a PDF, or study it here — free, no sign-up.

  1. Which technique trains a model in multiple steps with increasing dataset sizes? Curriculum learning
  2. What must be true about a model before calling model.load_weights() successfully? Its layer shapes must match those of the saved weights
  3. What does dataset.repeat(3) do in tf.data? Iterates through the dataset 3 times
  4. Batch normalization is useful due to? It normalizes (adjustments) all the input earlier than sending it to the subsequent layer
  5. What is mixed precision training in TensorFlow? Using float16 for computations and float32 for weights to speed up training
  6. What does the num_parallel_calls parameter in dataset.map() do? Parallelizes the map transformation across multiple CPU threads
  7. What is the primary role of tf.train.CheckpointManager? Limiting the number of checkpoints kept with max_to_keep
  8. Which TensorFlow constant creates a 3×3 identity matrix? tf.eye(3)
  9. What is the purpose of tf.debugging.assert_shapes()? Verifies tensor shapes match expectations and raises an error if not
  10. Which of the following functions should not be used to classify an image at the output layer? ReLU
  11. What is the purpose of the ModelCheckpoint callback? Saves the model at specified intervals or when performance improves
  12. Which function creates a tf.data.Dataset from a list of NumPy arrays? tf.data.Dataset.from_tensor_slices()
  13. Which attribute gives you the number of elements in a TensorFlow tensor? tf.size()
  14. What is the purpose of a representative dataset in TFLite quantization? Calibrates quantization scales for activations to minimize accuracy loss
  15. Which TensorFlow function creates a tensor filled with zeros? tf.zeros()
  16. Which low-level TensorFlow function explicitly saves a model in SavedModel format? tf.saved_model.save()
  17. What does the drop_remainder=True argument do in dataset.batch()? Drops the last batch if it has fewer elements than the batch size
  18. Which Keras API allows building models with multiple inputs and outputs? Functional API
  19. Which Keras layer performs 2D convolution for image processing? Conv2D
  20. Which optimizer is recommended for training transformer-based models? Adam with warmup learning rate schedule
  21. What type of object does tf.saved_model.load() return? A trackable object containing the model's saved functions and variables
  22. A ______ is a network that includes feedback linkages from o/p to i/p as well as hidden layers. Recurrent neural network
  23. Which operation performs element-wise multiplication in TensorFlow? tf.multiply()
  24. Which callback stops training when a monitored metric stops improving? EarlyStopping
  25. Which tf.data method interleaves elements from multiple datasets? dataset.interleave()
  26. What is the difference between model.predict() and model(x) in Keras? predict() handles large datasets in batches; model(x) runs a single forward pass eagerly
  27. What is the rank of a scalar tensor in TensorFlow? 0
  28. What does dataset.prefetch(tf.data.AUTOTUNE) do? Prepares the next batch while the current one is being processed
  29. What does tf.keras.applications provide? Pre-built, pre-trained models like ResNet, VGG, and MobileNet for transfer learning
  30. Which Keras initializer sets weights to small random values drawn from a normal distribution? GlorotNormal