TensorFlow/PyTorch Framework Fundamentals Questions
Practical knowledge of a major deep learning framework. Includes understanding tensors, operations, building neural network layers, constructing models, and training loops. Ability to read and modify existing code in these frameworks. Knowledge of how to work with pre-built layers and models.
EasyTechnical
40 practiced
Explain tf.function in TensorFlow 2.x. What does the decorator do, how does tracing work, what benefits for performance/tracing exist, and what pitfalls occur (e.g., Python side-effects and retracing)? Provide examples of when to add @tf.function and when to avoid it.
EasyTechnical
39 practiced
Explain the difference between model.train() and model.eval() in PyTorch, and their equivalents in tf.keras.Model. Which layers change behavior (BatchNorm, Dropout)? How can toggling modes affect inference results and gradients, and what checks would you run if evaluation performance differs unexpectedly from training?
HardSystem Design
37 practiced
Design a production model serving architecture that supports both TensorFlow and PyTorch models and requirements: A/B testing and Canary deployments, autoscaling, target p95 latency < 50ms, model versioning, monitoring (latency, errors, model drift), and safe rollback. Specify model formats (SavedModel, TorchScript, ONNX), serving platforms (TF-Serving, TorchServe, custom gRPC), containerization, and feature consistency guarantees.
HardSystem Design
50 practiced
Design an experiment management and model promotion workflow that supports both TensorFlow and PyTorch. Include logging (TensorBoard/W&B), model registry semantics, dataset versioning, hyperparameter sweeps, reproducible environments (Docker/Conda), and objective promotion criteria to move a model from staging to production. Explain artifact storage and metadata capture.
HardTechnical
40 practiced
For training a large Transformer model, propose concrete strategies to optimize memory and compute: mixed precision, activation checkpointing (activation recomputation), model parallelism, and optimizer state sharding (ZeRO). Compare practical implementation differences between TensorFlow (activation_checkpointing, XLA) and PyTorch (torch.utils.checkpoint, DeepSpeed, FairScale).
Unlock Full Question Bank
Get access to hundreds of TensorFlow/PyTorch Framework Fundamentals interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.