InterviewStack.io LogoInterviewStack.io

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.

HardTechnical
0 practiced
Training diverges when switching to DistributedDataParallel (DDP). Provide a step-by-step debugging checklist and fixes for common causes: incorrect data sharding, unsynchronized BatchNorm, inconsistent random seeds, in-place operations, and ensuring all processes reach barriers consistently.
MediumTechnical
0 practiced
Explain the use of torch.cuda.amp.autocast and GradScaler for mixed-precision training in PyTorch. Which layers/ops are sensitive to float16 (e.g., BatchNorm), how does autocast select dtypes for ops, and what configuration choices help maintain numerical stability?
MediumTechnical
0 practiced
Write a TensorFlow Keras Callback (subclassing tf.keras.callbacks.Callback) that implements early stopping with a patience parameter and saves the best model weights to a provided path. It should monitor a named metric and optionally restore best weights at the end of training.
EasyTechnical
0 practiced
Explain common weight initialization strategies (Xavier/Glorot, He/Kaiming, orthogonal) and why initialization affects training stability. In PyTorch or TensorFlow, show how to apply Kaiming initialization to Conv2D and Linear layers and when zero initialization for biases is acceptable.
HardTechnical
0 practiced
Explain a full integer quantization pipeline for both PyTorch and TensorFlow: post-training static quantization, quantization-aware training (QAT), and integer-only inference. Describe calibration with a representative dataset, per-channel vs per-tensor quantization, and how to evaluate accuracy and latency trade-offs after quantization.

Unlock Full Question Bank

Get access to hundreds of TensorFlow/PyTorch Framework Fundamentals interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.